Skip to content

Display row-level errors in instance editor - #1476

Merged
epatters merged 2 commits into
mainfrom
row-errors
Sep 10, 2026
Merged

Display row-level errors in instance editor#1476
epatters merged 2 commits into
mainfrom
row-errors

Conversation

@epatters

Copy link
Copy Markdown
Member

The presence of errors is indicated by coloring the new row headers red and the errors themselves are displayed on hover in a tooltip.

image

@epatters
epatters requested a review from kasbah September 10, 2026 04:17
@epatters
epatters added this pull request to stack #1477 September 10, 2026 04:17
@epatters epatters added enhancement New feature or request frontend TypeScript frontend and Rust-wasm integrations labels Sep 10, 2026
Comment thread packages/documents/src/instance/equation-validation.ts
Comment thread packages/ui-components/src/table_editor/table_editor.tsx
const firstRow = canvas.getAllByRole("row")[1]!;
const cell = within(firstRow).getAllByRole("gridcell")[activeColumn]!;
const firstRow = canvas.getAllByRole("row")[1] as HTMLTableRowElement;
const cell = firstRow.cells[activeColumn]!;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't want to complain about having tests for UI components, but these are rather fragile.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fair, I'll prune these and look at making them less brittle.

undefined
cellIssues(cell())
.map(issueMessage)
.join("\n") || undefined

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to improve the styling of these too. I could do that in a follow-up PR.

Base automatically changed from rich-text-am-solid-primitives to main September 10, 2026 16:24

@kasbah kasbah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just UI wise I'd prefer highlighting (background) the whole row in the same pink/red we are using for the other errors. I guess then the tooltip needs to appear on the whole row as well. I'd be ok with changing that on a follow-up PR though. Rest LGTM.

@epatters

Copy link
Copy Markdown
Member Author

Thanks for the review! I actually started by coloring the whole row red, but thought it looked too aggressive, as well as possibly being confusing with cell-level errors. Anyway, we can play around with it.

@epatters
epatters merged commit 99ba35f into main Sep 10, 2026
18 checks passed
@epatters
epatters deleted the row-errors branch September 10, 2026 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request frontend TypeScript frontend and Rust-wasm integrations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants