fix(dashboard): point refund and return reason row links at their edit routes - #16742
fix(dashboard): point refund and return reason row links at their edit routes#16742Minhal128 wants to merge 1 commit into
Conversation
…t routes
The configurable refund and return reason list tables set `getRowHref` to
`/settings/{refund,return}-reasons/:id`. Neither route has an element: in
the route map both `:id` entries only carry an `edit` child, so the URL
matches but renders nothing and the row click is a dead navigation.
Both domains reach editing through `/settings/{refund,return}-reasons/:id/edit`,
which is what the row actions menu already navigates to, so the row links now
point there too. The legacy tables never made rows clickable, so this only
affects the configurable tables used when `view_configurations` is enabled.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 9231a73 The changes in this PR will be included in the next version bump. This PR includes changesets to release 83 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Thanks for the contribution! Initial automated review looks good. The PR fixes a dead-navigation bug in the refund-reason and return-reason configurable list tables. When view_configurations is enabled, clicking a row navigated to /:id, which has no route element — only its edit child is mapped to a lazy-loaded component in get-route.map.tsx. The fix appends /edit to getRowHref in both adapters, aligning row clicks with the existing action-menu navigation (which already used /:id/edit). The route map was verified: both :id nodes carry no element, confirming the dead-navigation bug. The changeset is included with the correct patch bump type and fix(dashboard): ... message format. No tests are required for this trivial one-line navigation fix. Triggered by: new PR opened |
Summary
What — The configurable refund reason and return reason list tables link each row to
/settings/refund-reasons/:idand/settings/return-reasons/:id. Both now link to that entity'seditroute instead.Why — Neither
:idroute has an element. Inget-route.map.tsxboth entries are only a container for aneditchild:So
/settings/refund-reasons/:idmatches, renders nothing, and the row click is a dead navigation — the URL changes and the list stays as it was. These are the only two:idroutes in the settings tree without an element, which is why the rest of the configurable tables are unaffected.This is the same class of bug as #16625 (shipping profile rows pointing at an unregistered path), found by checking the other
getRowHrefvalues against the route map rather than the reported one.How —
getRowHrefin both table adapters now returns.../${row.id}/edit. That is the destination the row actions menu already uses:so a row click and the row's own “Edit” action now agree. The legacy tables never made rows clickable, so nothing changes outside the configurable tables used when
view_configurationsis enabled.Testing — With
view_configurationsenabled, go to Settings → Refund Reasons and click a row: before, the URL changed and nothing rendered; now the edit drawer opens, matching the row actions menu. Same for Settings → Return Reasons.I did not run the dashboard typecheck locally — the change is the contents of a template literal, so its type is unchanged.
Notes
An alternative reading is that these rows were not meant to be clickable at all, matching the legacy tables. I went with the edit route because it keeps the row navigation the configurable table opted into and makes it agree with the row actions. Happy to switch to dropping
getRowHrefif you prefer.