-
Notifications
You must be signed in to change notification settings - Fork 0
fix: restore phone-safe dock behavior #1355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -520,17 +520,15 @@ export function CalculatorsSearchPage() { | |
| const dockHidden = footerHidden && !dockFocused; | ||
| const reserveTransitioning = useReserveTransitionMarker(dockHidden, activeCalc); | ||
| useEffect(() => { | ||
| if (!activeCalc) return undefined; | ||
| let cancelled = false; | ||
| if (!activeCalc) return; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When the required unit suite runs, AGENTS.md reference: AGENTS.md:L167-L168 Useful? React with 👍 / 👎. |
||
| // Submitting a focused dock input unmounts the dock before React is | ||
| // guaranteed to dispatch blur. Clear the latch after teardown so the dock | ||
| // can resume hide-on-scroll when the calculator sheet closes. | ||
| // can resume hide-on-scroll when the calculator sheet closes. This reset | ||
| // must survive a fast close: cancelling the microtask during effect cleanup | ||
| // can otherwise leave the remounted dock permanently focus-pinned. | ||
| queueMicrotask(() => { | ||
| if (!cancelled) setDockFocused(false); | ||
| setDockFocused(false); | ||
| }); | ||
| return () => { | ||
| cancelled = true; | ||
| }; | ||
| }, [activeCalc]); | ||
|
|
||
| const compact = density === "compact"; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
Avoid duplicate declarations that fail Stylelint.
The
100vh/100svhfallback pattern triggers the configureddeclaration-block-no-duplicate-propertieserrors. Put thesvhoverride in@supportsso the stylesheet passes lint while preserving fallback behavior.Proposed fix
`@media` (max-width: 639px) { .phone-viewport-shell { position: relative; width: 100%; min-height: 100vh; height: 100vh; - min-height: 100svh; - height: 100svh; } } + +@supports (height: 100svh) { + `@media` (max-width: 639px) { + .phone-viewport-shell { + min-height: 100svh; + height: 100svh; + } + } +}📝 Committable suggestion
🧰 Tools
🪛 Stylelint (17.14.0)
[error] 2345-2345: Duplicate property "min-height" (declaration-block-no-duplicate-properties)
(declaration-block-no-duplicate-properties)
[error] 2346-2346: Duplicate property "height" (declaration-block-no-duplicate-properties)
(declaration-block-no-duplicate-properties)
🤖 Prompt for AI Agents
Source: Linters/SAST tools