Refactor grant selection table to be more informative#1314
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the grant selection table to separate project name, start/end dates, and status into distinct columns and updates grant links to open details in a new tab.
- Split the combined project name + date column into
projectName,startDate,endDate, andawardStatuscolumns in the workflow grants table. - Removed the now-obsolete
grant-title-date-cellcomponent and updated templates accordingly. - Updated acceptance tests and link templates to use the new CSS selectors and open grant detail links with
target="_blank".
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/acceptance/proxy-submission-test.js | Updated selectors from .projectname-date-column to .projectname-column |
| tests/acceptance/nih-submission-test.js | Same selector updates across multiple scenarios |
| app/controllers/grants/detail.js | Added optional chaining on queuedModel.submissions to avoid runtime errors |
| app/components/workflow-grants/index.js | Replaced the combined title/date cell with separate columns for project name, dates, and status |
| app/components/workflow-grants/index.hbs | Removed grantTitleDateCell, added dateCell component |
| app/components/submission-funding-table/index.hbs | Corrected @target to target syntax |
| app/components/grant-title-date-cell/index.js | Deleted obsolete component class |
| app/components/grant-title-date-cell/index.hbs | Deleted obsolete template |
| app/components/grant-link-newtab-cell/index.hbs | Corrected @target to target syntax |
Comments suppressed due to low confidence (3)
tests/acceptance/nih-submission-test.js:49
- Consider adding assertions for the new
Start,End, andStatuscolumns to ensure those values render correctly in acceptance tests.
await waitFor('[data-test-grants-selection-table] tbody tr td.projectname-column');
app/components/workflow-grants/index.js:49
- [nitpick] Using the same
date-columnclass for both start and end dates could lead to ambiguity; consider more specific names likestart-date-columnandend-date-column.
className: 'date-column',
|
@markpatton Changes look good in general. I agree with copilot that adding I also noticed something in my testing. If I click a grant so it is selected, then click on the award id link in the bottom table, the new tab opens fine, but if I go back to the submission workflow, the grant is deselected and removed from the top table. I guess it is acting as though the user is saying to remove the grant, but it is odd from a UX perspective. Not sure how involved the change would be, buy maybe clicking on the award id link in the bottom table should not add/remove the grant, it should just open the new tab. WDYT? |
|
@rpoet-jh Both points make sense. I will take a look. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
|
@rpoet-jh Fixed the selection when clicking on a grant. |


I'm planning to ignore the sonar qube failure. It is related to duplicated code in tests and is captured in eclipse-pass/main#1177.