fix: cap search-switch width and use a centered modal for merge/rename confirmations - #19
Conversation
- Add isSearchSwitch context detection - Set fixed width of 711.5px for search box in search-switch context - Preserve flex behavior for anonimizador and set-de-datos contexts - Prevents search box from crowding the Switch+label on the right Refs: Figma node 40001478:54722 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…l, not an anchored popover
The rename-collision and merge-previous/next confirmations were rendered as
Radix Popovers anchored to their trigger element. The real Figma design
(node 40002384:38487) is a centered modal over a full-screen backdrop, not
something tethered to a pill or button.
Swap both call sites to a shared internal ConfirmDialog backed by this
repo's Dialog primitive, and correct the visual details to match Figma:
- 4px gap between title/description, 16px from text block to buttons,
12px between buttons (previously a single 12px gap throughout)
- description text now text.default (previously the lighter grey
text.lighter)
- drop the 341px width cap (it measured the inner content, not the full
389px card) in favor of DialogContent's existing responsive sizing
- add a visually-hidden DialogTitle so Radix's accessibility requirement
is met without changing the visible title's look
- rename-collision copy now names both identities explicitly per Figma
("Ya existe "X"." / "Al combinar, los turnos de "Y" pasan a "X".")
The merge-previous/merge-next confirm keeps its existing copy unchanged;
only its rendering primitive changes.
…ssues Follow-up to df8adeb's Popover->Dialog migration for ConfirmDialog: - Cap DialogContent at maxW 389px (Figma node 40002384:38487 card width) instead of falling through to the 700px default from Dialog.tsx. - Drop the custom boxShadow override, which competed non-deterministically with DialogContent's own `dialog` shadow token. - Wrap the description in DialogDescription (asChild) to satisfy Radix's aria-describedby requirement and silence its dev warning. - Make the visible title itself the DialogTitle (asChild) instead of rendering a separate visually-hidden duplicate, so screen readers announce it once; removes the now-unused visuallyHidden class.
Reviewer's GuideThis PR makes two targeted UI fixes: it constrains the Toolbar search input width only in the Sequence diagram for SidePanel rename-collision confirmation modalsequenceDiagram
actor User
participant SidePanel
participant AvatarPill
participant ConfirmDialog
participant Dialog
participant Consumer
User->>AvatarPill: onEditCommit(value)
AvatarPill->>SidePanel: handleRenameCommit(index, value)
SidePanel->>SidePanel: [detects name conflict]
SidePanel->>ConfirmDialog: ConfirmDialog(open=true, title, description)
ConfirmDialog->>Dialog: Dialog(open=true, onOpenChange)
User->>ConfirmDialog: click Combinar
ConfirmDialog->>SidePanel: onConfirm()
SidePanel->>SidePanel: confirmPeopleMerge()
SidePanel->>Consumer: onMergePeople(sourceIndex, targetIndex)
SidePanel->>ConfirmDialog: ConfirmDialog(open=false, title, description)
User->>ConfirmDialog: click Cancelar
ConfirmDialog->>SidePanel: onCancel()
SidePanel->>SidePanel: finishEditing()
SidePanel->>ConfirmDialog: ConfirmDialog(open=false, title, description)
Flow diagram for Toolbar search-switch width handlingflowchart LR
C[Toolbar context]
SZ[SearchZone wrapper]
S[Search component]
SW[ModoEdicion switch]
C -->|context !== search-switch| SZ
SZ --> S
S --> SW
C -->|context === search-switch| SZFixed[SearchZone with fixed layout]
SZFixed --> SFixed[Search w 711.5px, flexShrink 0]
SFixed --> SW
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
confirmTitle used subtitle.sm.strong (14px) instead of subtitle.md.strong (20px) — Figma's real title style per node 40002384:38487's own annotations. confirmDescription used label.sm.default (12px) instead of subtitle.sm.default (14px). Pre-existing since the merge-confirmation popover shipped in v0.4.0; caught now while polishing this same dialog's Figma fidelity. Verified in Storybook: title/description now render at Figma's actual scale.
|
Follow-up fix ( |
Summary
Two independent, surgical fixes for visual regressions found while integrating
@aymurai/uiintodesktop-app's Voz a Texto (VTT) screens:search-switchwidth — the search box was stretching edge-to-edge instead of the fixed 711.5px Figma specifies (node40001478:54722), crowding the "Modo Edición" switch. Scoped tosearch-switchonly;anonimizador/set-de-datosare untouched (verified byte-for-byte unchanged in review).Popoveranchored to whichever pill/button triggered them. The component's own doc comment cites Figma node40002384:38487("Conflicto Nombre etiqueta") as the reference — but that node is a centered modal with a full-screen overlay, not something anchored to a trigger. Swapped to this repo's existingDialogprimitive.Mid-implementation Figma correction
The original plan's literal code for the confirm dialog didn't fully match Figma once pulled directly (
get_design_context/get_metadataon node40002384:38487). Corrected during implementation:389px(341px content + 24px padding — Figma's actual measurement), not left toDialogContent's 700px default.text.default(wastext.lighter— Figma's description is the same dark color as the title, not muted grey).Ya existe "{target}"., descriptionAl combinar, los turnos de "{source}" pasan a "{target}".(previously a generic, non-specific sentence).DialogTitle/DialogDescription(bothasChild, wrapping the existing styled text) — Radix'sDialog(unlike thePopoverit replaces) requires these for accessibility; without them it logs a dev warning and screen readers get a degraded experience.boxShadowoverride that competed non-deterministically withDialogContent's own shadow token (same CSS-cascade-order class of bug as an unrelatedArchiveProgressfix earlier in this project's history) — verified by inspecting the compiled stylesheet directly that the finalmaxW:[389px]override does reliably win (same-layer, later source order), since this project's Panda setup doesn't always let a latercss()call win the way JS call order implies.Compatibility
ToolbarPropsorSidePanelProps— both fixes are internal-rendering-only.onRenamePerson/onMergePeople/onMergePrevious/onMergeNextkeep identical call sites and semantics.desktop-app's next bump off its currently-pinnedv0.4.1tag.Deliberately out of scope
Figma's "Combinar" button mockup renders solid
#3F479Dat rest, while this repo'sButton variant="primary"(unchanged, pre-existing since v0.4.0) rests at a lighter#C5CAFFand only reaches#3F479Don:active— very likely the Figma mockup is just showing the button in its pressed state, not specifying a different resting color. Flagged during implementation and review, deliberately not changed here since it would affect everyButtonconsumer in the library — a separate decision if the team wants to pursue it.Verification
pnpm typecheck/pnpm biome check/pnpm build— all pass.Components/Toolbar(SearchSwitch,SearchSwitchWithResults,Anonimizador,SetDeDatos,Matrix) andComponents/SidePanel(RenameAndCollision,MergeConfirmation,Default,InvalidTimestamp) during the task implementation/review passes.Referencing the two original upstream reports this closes: the
search-switchwidth regression, and the rename/merge confirmation not matching Figma node40002384:38487.Do not merge without review — this library is consumed by
desktop-apppinned tov0.4.1.Summary by Sourcery
Cap toolbar search width in the search-switch context to match Figma and change SidePanel merge/rename confirmations from anchored popovers to centered modals with improved copy and styling.
Bug Fixes:
Enhancements:
Documentation: