Skip to content

Refactor/UI tweaks#25

Merged
u8array merged 6 commits into
mainfrom
refactor/ui-tweaks
May 7, 2026
Merged

Refactor/UI tweaks#25
u8array merged 6 commits into
mainfrom
refactor/ui-tweaks

Conversation

@u8array
Copy link
Copy Markdown
Owner

@u8array u8array commented May 7, 2026

No description provided.

u8array added 3 commits May 7, 2026 22:33
Replaces the '-' button with a trash icon to delete the current page.
Adds a confirmation dialog before deletion. Also, adds tooltips to print
speed and darkness settings for better usability.
Introduce a reusable `ConfirmDialog` component and integrate it into the
`PaginationControl` for page deletion. This change replaces the direct,
irreversible deletion with a confirmation prompt, improving user
experience and preventing accidental data loss.

The confirmation dialog provides clearer messaging and separates the
"delete" action from the "cancel" action. Locale keys have also been
updated to reflect this change.
Each palette group (Text, 1D Linear, 2D Matrix, Postal & Legacy, Shapes)
becomes an independently toggleable section with a chevron header. Open
state is persisted per section id in localStorage so the UI is stable
across reloads. Adds a generic CollapsibleSection primitive in
components/ui/ that the palette consumes; the same component can later
back disclosure-style sections elsewhere.
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces several UI enhancements, including a new ConfirmDialog for page deletions and a CollapsibleSection component used in the object palette. Additionally, it refines the properties panel by moving configuration hints into tooltips and adds necessary localization strings across multiple languages. Feedback highlights opportunities to improve the new components, specifically by preventing background scrolling in the dialog, addressing a state synchronization bug in the collapsible section when the id prop changes, and enhancing accessibility for both components using ARIA attributes.

Comment thread src/components/ui/ConfirmDialog.tsx
Comment thread src/components/ui/ConfirmDialog.tsx Outdated
Comment thread src/components/ui/CollapsibleSection.tsx Outdated
Comment thread src/components/ui/CollapsibleSection.tsx Outdated
u8array added 2 commits May 7, 2026 22:52
ConfirmDialog: add role=alertdialog/aria-modal/aria-describedby for
screen-reader support, and lock body scroll while open so the modal
stays anchored.

CollapsibleSection: re-sync open state when id prop changes using
React's prev-vs-current setState-during-render pattern (avoids the
react-hooks/set-state-in-effect lint rule), and link the toggle button
to the content via aria-controls.

PropertiesPanel: replace the bare ⓘ glyph with heroicons
InformationCircleIcon for consistent rendering across systems.

LabelConfigPanel: wrap the printer-settings group in a
CollapsibleSection (default-collapsed) so the optional fields read as a
real section instead of plain text under a divider.
The Media mode, Label shift and Print quantity inputs become a
default-open Output section, mirroring the Printer (optional) section
below it. Renames printerSettingsHeading from 'Printer settings
(optional)' to 'Printer (optional)' so the two section titles read
cleanly side-by-side without redundant 'settings' wording. Adds
label.outputHeading in all 32 locales.
@u8array
Copy link
Copy Markdown
Owner Author

u8array commented May 7, 2026

/gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request enhances the UI by introducing collapsible sections in the palette and properties panels, adding a confirmation dialog for page deletions, and incorporating tooltips for printer settings. It also updates localization files for all supported languages. A suggestion was made to broaden the CSS transition property in the new confirmation dialog to ensure smooth background color animations.

Comment thread src/components/ui/ConfirmDialog.tsx Outdated
The destructive variant changes both background and opacity on hover but
`transition-opacity` only smooths the latter. Switching to the broader
`transition` class covers both, so the red bg hover blends instead of
snapping.
@u8array u8array merged commit 314b3cd into main May 7, 2026
2 checks passed
@u8array u8array deleted the refactor/ui-tweaks branch May 7, 2026 21:24
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