fix(mobile): hide the New note form's key hints on the phone (ZenNotes/zennotes#842) - #83
Merged
Merged
Conversation
…s/zennotes#842) The New note form that the note search opens from its Create row (core 2.54) showed the desktop's hardware-keyboard hints on the phone: "↑↓ pick", "↵ create" and "esc back" in the footer beside Back and Create, and a "Shift+↵" chip inside the Open it button when the name already exists. A phone has no hardware keyboard, so they were noise in a footer that sits right above the soft keyboard. The rule that hides every other palette footer could not take this one, because the form's footer also holds Back and Create. The core now marks the hint group and the chip with `data-keyboard-hints`, and this rule hides whatever carries that marker on the phone layout. Until the shell adopts a core with the marker the rule matches nothing; a tablet with a keyboard keeps the hints, since the rule is scoped to `.zn-phone`. Seen on the iPhone 17 Pro Max simulator with a local core candidate: the footer shows Back and Create only, and the button reads just "Open it".
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 free
to 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.
The New note form that the note search opens from its Create row (core 2.54) shows the desktop's hardware-keyboard hints on the phone:
↑↓ pick,↵ createandesc backin the footer beside Back and Create, and aShift+↵chip inside the Open it button when the name already exists. Filed as ZenNotes/zennotes#842.The rule that hides every other palette footer could not take this one, because the form's footer also holds Back and Create. The core now marks the hint group and the chip with
data-keyboard-hints(ZenNotes/zennotes@1488f50b, on the desktop'sv2.55.0branch), and this PR adds the one rule that hides whatever carries that marker on the phone layout, next to the palette-footer rule insrc/ui-mobile/mobile.css. Until the shell adopts a core with the marker the rule matches nothing, so it can land ahead of the adoption; a tablet with a keyboard keeps the hints, since the rule is scoped to.zn-phone.Verified on the iPhone 17 Pro Max (iOS 27) simulator with a local core candidate packed from that commit and adopted as a try-out (
ZEN_ALLOW_DIRTY_CORE=1 npm run core:adopt -- --from ..., the shell restored to the published 2.54.1 set afterwards,boundaries:checkgreen): menu, Search, a new name, the Create row, and the footer shows Back and Create only; with an existing note's name the red "already exists" line shows and the button reads just "Open it". The Android rule is the same text; the emulator was not booted for it.