fix(mobile): give the Add Case modal a reachable submit button - #368
Open
shenlvkang-collab wants to merge 1 commit into
Open
fix(mobile): give the Add Case modal a reachable submit button#368shenlvkang-collab wants to merge 1 commit into
shenlvkang-collab wants to merge 1 commit into
Conversation
mobile.css hides #createCaseModal's .set-foot below 860px, and that modal's header — unlike Settings' — carries no set-head-save. So on a phone the Create/Link button existed nowhere and the modal could not be submitted at all. Adds the header button and drives both together through switchCaseModalTab() and submitCaseModal(), so whichever one is pressed the other shows the same pending state and is equally unclickable. Following the Settings pattern also means Add Case picks up the existing .set-head-actions:has(.set-head-save) tray and .set-head-save sizing with no new CSS; the mobile.css comment that still listed Add Case as a lone-× sheet is corrected to match.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix(mobile): give the Add Case modal a reachable submit button
The bug
On a phone, the Add Case modal cannot be submitted at all — the Create/Link button does not
exist anywhere on screen.
mobile.csshides#createCaseModal's.set-footbelow 860px:and, unlike the Settings modal, that modal's header carries no
set-head-save. So the onlysubmit control is the one that was just hidden. Filling in a case name and tapping around
does nothing; the sheet can only be dismissed.
The fix
Add the header button, following the Settings modal's existing pattern (close first in the
DOM so the focus trap still lands on it;
row-reverseputs save to its left), and drive bothbuttons together in
switchCaseModalTab()andsubmitCaseModal()— so whichever one ispressed, the other shows the same pending label and is equally disabled. That matters because
the clone path holds the request open for minutes and a second click starts a second clone.
Following the Settings pattern also means Add Case picks up the existing
.set-head-actions:has(.set-head-save)tray and.set-head-savesizing with no new CSS.The one CSS edit is a comment:
mobile.cssstill described Add Case as one of "the two sheetsthat carry a lone ×", which this change makes false, and it is exactly the comment a reviewer
would check.
Verification
Isolated worktree, clean
npm ci:Found while fixing the response viewer (#365) on a phone; unrelated to it, so it is its own PR.