-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Conversation List Highlighting #7453
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: trevor-signal <[email protected]>
Co-authored-by: Wyatt Childers <[email protected]>
Co-authored-by: Yash <[email protected]> Co-authored-by: ayumi-signal <[email protected]> Co-authored-by: Jamie Kyle <[email protected]> Co-authored-by: Fedor Indutny <[email protected]> Co-authored-by: trevor-signal <[email protected]>
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.
@brianHarder thanks for this PR! It looks great; I have one clarifying question.
It's great that you added a mock-test, but I think it's unnecessary for this kind of small stylistic change -- mock tests are great but also have overhead so we don't add them for every change.
@@ -290,7 +290,12 @@ export const BaseConversationListItem: FunctionComponent<PropsType> = | |||
data-testid={testId} | |||
disabled={disabled} | |||
onClick={onClick} | |||
onMouseDown={onMouseDown} | |||
onMouseDown={event => { | |||
event.preventDefault(); |
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.
can you say more why this change is necessary?
Contributor checklist:
main
branchpnpm run ready
run passes successfully (more about tests here)Description
This PR ensures that highlighting in the chat list only occurs by mouse hover and keyboard navigation. Previously there was an issue where clicking and dragging on a chat would cause it to stay highlighted both throughout the drag and even after mouse release. To achieve this, the default mouse behavior has been prevented, and new CSS classes have been added to only highlight conversation lists via mouse hover or the tab key.
I manually tested this PR by performing mouse movements in my staging environment and ensuring that the highlighting was either applied or not applied as expected. I specifically simulated the click and drag several times to make sure the highlight was not lingering. I also added a test file - conversationListHighlight_test.ts - which simulates a hover movement to check for highlighting and a click-drag movement to check that the highlight does not stay. I did all my testing on my laptop, which runs macOS 10.15.7.
Screen.Recording.2025-08-15.at.3.59.53.PM.mov