Files
hapi/web/src
hangerandGitHub bffbe1b861 fix(web): add close button to dialog so modals are dismissable on mobile (#792)
* fix(web): add close button to dialog so modals are dismissable on mobile

The shared DialogContent had no close affordance — desktop users could
press Escape or click the overlay, but on mobile (no Escape key, dialog
spans calc(100vw-24px) leaving almost no tappable overlay) there was no
way to dismiss it. Add a DialogPrimitive.Close X button in the top-right,
fixing every dialog that uses this component at once.

* fix(web): reserve header space for dialog close button

Address review feedback: the absolutely-positioned close button overlaps
the top-right of every dialog. Long/breaking titles (e.g. DiffView's
break-all filename) could wrap underneath the 32px tap target. Add pr-12
to DialogHeader rather than padding DialogContent globally, so the title
row clears the button while body content (code blocks, diffs) keeps full
width.

* fix(web): localize dialog close button aria-label

Use the existing button.close locale string instead of a hardcoded
"Close" so screen-reader users get the label in their language (zh-CN: 关闭).
2026-06-04 17:53:40 +08:00
..
2026-05-21 10:44:46 +08:00
2026-01-02 19:19:40 +08:00