Skip to content

Make the first tap on a sidebar comment open it on iPhone and iPad - #91

Merged
kylemcd merged 5 commits into
mainfrom
85-sidebar-tap-ios
Oct 5, 2026
Merged

kylemcd merged 5 commits into
mainfrom
85-sidebar-tap-ios

Conversation

@kylemcd

@kylemcd kylemcd commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

Refs #85

On iOS, a tap that reveals buttons through :hover counts as a hover: WebKit stops before it sends mousedown and click. 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.

  • The hover reveal now sits in @media (hover: hover), so desktop is unchanged.
  • On touch screens (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.
  • The card carries a new is-editing class while an entry is edited. Nothing else reads it.

Testing

  • npm run check passes. New tests, all failing on main: 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 has is-editing while it's edited and drops it on Cancel.
  • Obsidian desktop: hovering an entry still shows its bar, and only that entry's. Pressing an empty comment's card opens its editor with the bar still hidden until hovered.
  • Obsidian desktop with touch emulated over CDP ((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.
  • A fresh-agent regression review of the first version found the empty-comment case; it's fixed in the second commit. A second fresh review of the fixed branch found nothing.
  • Not tested on an iPhone or iPad. No iOS simulator runtime is installed here, so the diagnosis rests on WebKit's tap behaviour, not on a repro. That's why this says "Refs", not "Fixes".

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.
@kylemcd
kylemcd marked this pull request as ready for review October 5, 2026 19:52
@kylemcd
kylemcd merged commit 986693d into main Oct 5, 2026
1 check passed
@kylemcd
kylemcd deleted the 85-sidebar-tap-ios branch October 5, 2026 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant