Repository navigation
Conversation
…nd undo hint The standard popover body showed only the message, so it read like a neutral tooltip. It now leads with a destructive alert icon, shows the message in medium weight, and adds the existing "Press Esc to undo" hint. Custom error.render content is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Code Metrics Report
Details | | main (b0fd352) | #638 (7e45cfd) | +/- |
|---------------------|----------------|----------------|-------|
+ | Coverage | 89.3% | 89.3% | +0.0% |
| Files | 227 | 228 | +1 |
| Lines | 7240 | 7401 | +161 |
+ | Covered | 6469 | 6615 | +146 |
+ | Test Execution Time | 2m31s | 1m53s | -38s |Code coverage of files in pull request scope (91.7% → 91.4%, patch 100.0%)
Reported by octocov |
Drop the undo hint and the popup border, reduce padding and cap the width at max-w-xs so long messages wrap. The lab's Draft note column now throws a longer message on "?" to show wrapping. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 1px error ring on the cell, including while focused - popup opens directly under the cell, aligned to its left edge - light red tint (Alert's danger-surface) layered over the opaque popover colour so table lines don't show through; softer shadow-sm - icon centred on the first text line, at 70% of the text colour - lab: "!!" in Draft note throws a long message to show wrapping Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- cell error ring is 1.5px (resting and focused) - error icons in the cell and popover use strokeWidth 2.5 - drop the focus ring on the in-cell error trigger; it drew a second box around the icon when focus returned to it on popover close Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #635. This changes how the error popover and the cell's error outline look; the editing-session behaviour, a11y labels and the
errorAPI are unchanged.Why
The default popover showed only the message, in the same neutral styling as a tooltip, so it didn't read as an error. It opened under the small icon rather than the cell, and the 2px red ring felt heavy in a dense table.
One thing for you to weigh in on: when the popover closes, focus returns to the in-cell icon (Base UI default). Sending it back to the editor via
finalFocusmight be nicer, but that touches your focus-group logic, so I left it alone.What (
editable-cell.tsx)strokeWidth={2.5}, and its focus ring is removed. The ring drew a second red box around the icon when focus returned to it on popover close; the trigger istabIndex={-1}, and keyboard users open details with Alt+↓ from the editor.<td>), opening directly underneath and aligned to the cell's left edge (it was aligned to the end of the icon trigger).danger-surfacebackground,danger-text), with no border and a lightershadow-sm.CircleAlerticon (strokeWidth={2.5}, the text colour at 70% opacity), centred on the first line of text, then the message. Long messages wrap atmax-w-xs.px-2.5 py-2). This also applies to customerror.rendercontent.Why the tint is a background-image
--danger-surfaceis--primitive-red-a3, a transparent colour. Used asbg-*, it replaces the opaquebg-popoverand the table's row lines show through. So the tint is layered as abackground-imageoverbg-popover, the same technique the editable-cell tint uses. I'll raise a separate theme proposal for a solid companion role (e.g.--danger-surface-solid→--primitive-red-3) for overlays. If we add that, this becomes a plainbg-danger-surface-solid.Demo
DataTable Lab → Editing errors → Draft note:
!shows a short message!!shows a long, full-sentence message, to check wrappingTest
vitest run src/components/data-table: 672 passedtsc --noEmitpasses🤖 Generated with Claude Code