Page MenuHomePhabricator

[web] Make "Mark as unread" button easier to click reliably
ClosedPublic

Authored by atul on Jul 28 2022, 11:32 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jun 27, 8:16 PM
Unknown Object (File)
Thu, Jun 27, 4:19 AM
Unknown Object (File)
Wed, Jun 26, 1:32 PM
Unknown Object (File)
Tue, Jun 25, 9:07 AM
Unknown Object (File)
Sun, Jun 23, 6:34 PM
Unknown Object (File)
Fri, Jun 21, 4:46 PM
Unknown Object (File)
Fri, Jun 21, 4:46 PM
Unknown Object (File)
Fri, Jun 21, 4:45 PM
Subscribers

Details

Summary

Context: https://linear.app/comm/issue/ENG-992/mark-as-unread-button-can-be-hard-to-press-on-web

Users reported that sometimes the "Mark as unread" button would disappear before they were able to click it. It looks like this was because there was a 1px gap (see image below) between the menu button (vertical ellipsis) and the toggle unread status button ("Mark as unread") where onMouseLeave would trigger and hide the toggle unread status button.

Screen Shot 2022-07-28 at 2.20.46 PM.png (1×1 px, 59 KB)

I was able to reproduce this issue consistently when moving the cursor slowly from the vertical ellipsis to "Mark as unread" button, but was able to avoid the issue by moving my cursor "fast." Not sure why onMouseLeave doesn't trigger if you move the cursor back within the div fast enough, but that's the behavior I observed.

This diff basically closes that 1px gap and gets things working reliably.

Test Plan

Was able to consistently mark a thread as read/unread without the "Mark as unread" button disappearing.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Jul 28 2022, 11:38 AM
Harbormaster failed remote builds in B10952: Diff 15065!
atul requested review of this revision.Jul 28 2022, 11:57 AM
This revision is now accepted and ready to land.Jul 28 2022, 12:08 PM
This revision now requires review to proceed.Jul 28 2022, 12:24 PM

Here's where the + 1px was introduced: https://phab.comm.dev/D462

Based on the diff description I think this was a visual/style change and wasn't to fix some other bug/issue

(cc @ashoat)

atul added a reviewer: ashoat. atul removed 1 blocking reviewer(s): tomek.Jul 28 2022, 12:59 PM

No context, seems good

web/chat/chat-thread-list-item-menu.css
44 ↗(On Diff #15065)

Pretty sure we don't need calc if it's just 100%, can't we just use 100%?

Please look into just using 100% before landing, I think it's the same

This revision is now accepted and ready to land.Jul 28 2022, 11:25 PM

remove unnecessary calc(...)

Please look into just using 100% before landing, I think it's the same

Yeah they're the same, updated this diff.