Skip to content

fix(ui): restore highlight options layout and clean up color name editing#3776

Merged
chrox merged 5 commits intomainfrom
fix/highlight-options-layout
Apr 6, 2026
Merged

fix(ui): restore highlight options layout and clean up color name editing#3776
chrox merged 5 commits intomainfrom
fix/highlight-options-layout

Conversation

@chrox
Copy link
Copy Markdown
Collaborator

@chrox chrox commented Apr 6, 2026

Summary

  • Restore the pre-feat: add named highlight colors with sync and picker ux fixes #3741 responsive layout for the AnnotationPopup highlight options row: re-add justify-between on the outer container and remove flex-1 from the color strip so the gap between style buttons and color circles responds naturally to the number of colors
  • Restore the pre-feat: add named highlight colors with sync and picker ux fixes #3741 compact grid (grid-cols-3 sm:grid-cols-5) for the HighlightColorsEditor settings panel and replace always-visible name inputs with a click-to-edit popover on each color circle (hover shows label as tooltip)
  • Add browser visual regression testing that renders the real AnnotationPopup component with Tailwind CSS and compares against baseline PNGs for 5, 10, and 15 color configurations

Test plan

  • pnpm test — 3054 unit tests pass
  • pnpm test:browser — 128 browser tests pass (including 3 new screenshot comparisons)
  • pnpm lint — clean
  • Manual: open a book, select text, verify the highlight options row has responsive spacing between style buttons and color circles
  • Manual: open Settings → Color → Highlight Colors, verify the compact grid layout and click-to-edit name popover on color circles

🤖 Generated with Claude Code

chrox and others added 5 commits April 6, 2026 22:14
…ting

Restore the pre-#3741 layout for both the AnnotationPopup highlight
options row and the HighlightColorsEditor settings panel.

HighlightOptions: re-add `justify-between` on the outer container and
remove `flex-1` from the color strip so the gap between the style box
and color strip responds to the number of colors.

HighlightColorsEditor: restore `grid-cols-3 sm:grid-cols-5` grid,
remove always-visible name inputs, and add a click-to-edit popover on
each color circle with hover tooltip for the label.

Add a browser screenshot test that renders the real AnnotationPopup
component with Tailwind CSS and compares against baseline PNGs for
5, 10, and 15 colors.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Configure resolveScreenshotPath to strip the OS suffix from baseline
file names so one set of PNGs works on both macOS and Linux CI.  Allow
a small pixel mismatch ratio (5%) to absorb font rendering differences.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CSS zoom renders differently on macOS vs Linux, causing dimension
mismatches in CI.  Use native 1x rendering instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use testFileDirectory in resolveScreenshotPath so baselines live in
src/__tests__/components/__screenshots__/ alongside the test file.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add headless: true and deviceScaleFactor: 2 to the browser config so
screenshot baselines render at 2x resolution consistently across
macOS and Linux CI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@chrox chrox merged commit ae2c421 into main Apr 6, 2026
3 checks passed
@chrox chrox deleted the fix/highlight-options-layout branch April 6, 2026 14:48
lexm2 pushed a commit to lexm2/readest that referenced this pull request Apr 7, 2026
…ting (readest#3776)

* fix(ui): restore highlight options layout and clean up color name editing

Restore the pre-readest#3741 layout for both the AnnotationPopup highlight
options row and the HighlightColorsEditor settings panel.

HighlightOptions: re-add `justify-between` on the outer container and
remove `flex-1` from the color strip so the gap between the style box
and color strip responds to the number of colors.

HighlightColorsEditor: restore `grid-cols-3 sm:grid-cols-5` grid,
remove always-visible name inputs, and add a click-to-edit popover on
each color circle with hover tooltip for the label.

Add a browser screenshot test that renders the real AnnotationPopup
component with Tailwind CSS and compares against baseline PNGs for
5, 10, and 15 colors.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant