Skip to content

Label row-dialog fields by name, keep clicks on the table - #1816

Closed
michielbdejong wants to merge 1 commit into
developfrom
claude/row-dialog-fields
Closed

michielbdejong wants to merge 1 commit into
developfrom
claude/row-dialog-fields

Conversation

@michielbdejong

Copy link
Copy Markdown
Contributor

Closes #1796

Branched from develop, not stacked on #1812 (#1795). The two PRs change different files and don't conflict. The "Due date … at 02:00:00" in the screenshots below is #1795, which #1812 fixes.

Root causes

  1. Shortnames as labels. ExpandedRowDialog renders AllProps → PropVal, the resource-page component. PropVal labels each value with property.shortname.
  2. The label is a link. That label is wrapped in <AtomicLink subject={property}>, which navigates in-app on click.
  3. Unlabelled checkbox. Nothing tied the label to the input that opens on edit. ValueFormEdit rendered InputSwitcher with no id, and the label was a <span> inside a link.
  4. Key warning. ValueFormEdit had <FaFloppyDisk /> followed by a bare Save. Wuchale compiles that into one message (<0/> Save), and its runtime (W_tx_) returns an unkeyed array of fragments, so React warns: "Check the render method of ValueFormEdit. It was passed a child from default."

Fix

  • AllProps/PropVal take a new labelByName prop, and ExpandedRowDialog sets it. With it:
    • the label is the property's name through columnLabel, the same helper the table headings use: "Due date", "Description", or a readable shortname when the property has no name. The shortname and description are in the tooltip.
    • the label is a <label htmlFor> for the input, not a link.
    • the property opens in a new tab from a small icon link next to the label, which is named "Open Due date in a new tab".
    • resource pages are unchanged: they still show the linked shortname.
  • ValueForm → ValueFormEdit → InputSwitcher pass the input id through, so the checkbox, and every other input that forwards id, is named by its label.
  • ValueFormEdit: <span>Save</span>, so the button's children are static JSX and no longer a message array. This matches InstallationPage.

Catalogs: one new string, Open {0} in a new tab. <0/> Save moves to plain Save and is marked obsolete. They were settled with one vite run after rm -rf src/locales/.wuchale, and I read the diff by hand.

Tests

  • src/components/PropVal.test.tsx (vitest, jsdom, real Store). The dialog label is the name, is a <label>, has the shortname in its tooltip and has no link ancestor. It falls back to "Due date" when the property has no name. The property link is target=_blank. After clicking "Empty", getByRole('checkbox', { name: 'Bought' }) finds the checkbox, which is its accessible name. The resource page still shows the linked shortname. Against develop, 4 of 5 fail. The resource-page case is the regression guard.
  • browser/e2e/tests/row-dialog.spec.ts (not @smoke). It opens a Grocery list row, checks the name labels, clicks a label and checks the URL doesn't change, then edits Bought and finds the checkbox by accessible name. It runs axe (label, link-name) on the open dialog. The key warning only appears with the wuchale transform, which vitest skips, so this spec's browser-diagnostics fixture is what catches it. Against develop it fails.

Locally, vitest needs Node 22, which is what CI uses. Under Node 26, jsdom's localStorage is undefined, and every Store-based test fails, including existing ones.

Screenshots

Playwright, en-GB, Europe/Amsterdam. The files are saved locally for review:

desktop 375 px
Project tasks row, before 1796-before-desktop.png: name, status, due-date, body, created-at as links 1796-before-375.png
Project tasks row, after 1796-after-desktop.png: Name, Status, Due date, Description, Created at, each with a new-tab icon 1796-after-375.png
Grocery row, editing Bought, before 1796-before-checkbox-desktop.png: checkbox with no name 1796-before-checkbox-375.png
Grocery row, editing Bought, after 1796-after-checkbox-desktop.png: checkbox named "Bought" 1796-after-checkbox-375.png

🤖 Generated with Claude Code

The expanded-row dialog reused PropVal as the resource page uses it. Each
field was labelled with the raw shortname (`due-date`, `body`), and the
label was an in-app link, so clicking it left the table for the Property
page. The input that opened on edit had no label, so the All day checkbox
had no accessible name. Editing also logged a React key warning: wuchale
compiled the icon and bare "Save" into one message, and its runtime
returns an unkeyed array.

- AllProps/PropVal take `labelByName`, which ExpandedRowDialog sets.
  Fields are then labelled with the property's name through
  `columnLabel`, as the table headings are, with the shortname and
  description in a tooltip. The label is a `<label for>` the edited
  input, and the property opens in a new tab from a separate icon link.
  Resource pages keep the linked shortname.
- ValueForm and ValueFormEdit pass the input id through to InputSwitcher.
- ValueFormEdit wraps "Save" in its own span, so the button's children
  are static and there is no message array.

Closes #1796

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@michielbdejong michielbdejong added bug Something isn't working browser labels Sep 25, 2026
joepio added a commit that referenced this pull request Sep 25, 2026
#1816 labels the row dialog's fields with the property's name ("Date",
"Assignee") instead of its shortname. calendar.spec.ts:84 and
kanban.spec.ts:349 still looked for the lowercase shortname and failed
on batch run 4630.
joepio added a commit that referenced this pull request Sep 25, 2026
…) (#1828)

Combined batch, green on Mancave in run 4639 on 3be85ae.

Includes #1809, #1810, #1811, #1812, #1813, #1814, #1815, #1816, #1817,
#1818, #1819, #1820, #1821, #1823, #1824, #1827 and #1765, plus the e2e
label updates for #1816 and settled translation catalogs.

joepio commented Sep 25, 2026

Copy link
Copy Markdown
Member

Landed on develop in 46562ff via the combined batch #1828 (green on Mancave, run 4639). Closing.


Generated by Claude Code

@joepio joepio closed this Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

browser bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Row dialog: fields labelled by shortname, label links leave the table, unlabelled checkbox, key warning

2 participants