From 67310771914bbcdb15fcf3de12abb2ab461f2e22 Mon Sep 17 00:00:00 2001 From: thepra Date: Tue, 6 Oct 2026 22:43:35 +0200 Subject: [PATCH] Dialogs close from a button and rise from the bottom on phones MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DModal draws a close button (✕, named by CloseText) beside its heading, in a header that stays in view while the box scrolls; a long list of who liked a post left only the thin margins around the box to tap out of it. A new ResponsiveBottom placement makes the box a sheet from the bottom below md and keeps it in the middle from md; the report, liked-by and boosted-by, edit history and public notice dialogs use it. Boxes are at most 100dvh tall, so a phone's browser bars don't cut them, and a bottom sheet leaves 3rem above itself and clears the home indicator. The report dialog gets a Cancel button. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01LsXgEaXee4GCU1hwYgPJXw --- Components/Content.razor | 2 +- Components/Daisy/Actions/DModal.razor | 28 +++++++++++++++++++++---- Components/Daisy/Actions/DModalEnums.cs | 4 +++- Components/InteractedByDialog.razor | 2 +- Components/PublicNoticeHost.razor | 2 +- Components/ReportDialog.razor | 7 +++++-- Styles/neo.css | 8 +++++++ 7 files changed, 43 insertions(+), 10 deletions(-) diff --git a/Components/Content.razor b/Components/Content.razor index 079976b..85298aa 100644 --- a/Components/Content.razor +++ b/Components/Content.razor @@ -398,7 +398,7 @@ } @if (isHistoryOpen) { - + @Localizer["Edit history"]
    diff --git a/Components/Daisy/Actions/DModal.razor b/Components/Daisy/Actions/DModal.razor index 59a8ad6..fcd6cce 100644 --- a/Components/Daisy/Actions/DModal.razor +++ b/Components/Daisy/Actions/DModal.razor @@ -2,13 +2,30 @@ @* daisyUI Modal: https://daisyui.com/components/modal/ . Always rendered; the open state lives in C# (@bind-IsOpen) and shows as modal-open. On opening, the box takes the focus (Blazor's FocusAsync) so that Escape, handled on the - root, closes it; the backdrop button stretches over the area outside the box and closes it on click. *@ + root, closes it; the backdrop button stretches over the area outside the box and closes it on click, and a visible + close button (ShowClose, named by CloseText) sits beside the heading, which stays in view while the box scrolls. *@