Repository navigation
Make the first tap on a sidebar comment open it on iPhone and iPad - #91
Merged
Merged
Conversation
iOS treats a tap that reveals buttons through :hover as a hover and never sends the mousedown and click. The entry action bar faded in on hover, so the first tap on a comment in the sidebar only showed the bar: the card didn't open and the note didn't scroll to its text (#85). Keep the hover reveal for pointers that can hover, and on touch screens show the bar on the open card instead.
Pressing an empty comment's card edits it instead of opening it, so on a touch screen its React / Resolve / More bar never appeared, and the comment couldn't be resolved or deleted from its card. Mark a card while an entry is being edited, and show the bar on it on touch screens too. Also find the test's @media blocks with one regex instead of a brace counter.
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.
Refs #85
On iOS, a tap that reveals buttons through
:hovercounts as a hover: WebKit stops before it sendsmousedownandclick. Each comment's React / Resolve / More bar fades in on.dc-entry:hover, so the first tap on a comment in the sidebar only showed that bar. The card didn't open and the note didn't scroll to its text.@media (hover: hover), so desktop is unchanged.hover: none) the bar shows on the open card, and on a card whose entry is being edited. Pressing an empty comment's card edits it instead of opening it, so without the second case an empty comment couldn't be resolved or deleted from its card on a phone or tablet.is-editingclass while an entry is edited. Nothing else reads it.Testing
npm run checkpasses. New tests, all failing onmain: the hover reveal applies only where the pointer can hover; touch screens show the bar on an open or edited card; an empty comment's card hasis-editingwhile it's edited and drops it on Cancel.(hover: none)matches), in the margin and the sidebar: closed cards show no bar; opening a card shows the bar on each entry; pressing an empty comment's card shows its bar with the editor, and Cancel hides it again.