Skip to content
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

Fix outstanding UX issues with replies/mentions/keyword notifs #28270

Merged
merged 10 commits into from
Jan 22, 2025

Conversation

taffyko
Copy link
Contributor

@taffyko taffyko commented Oct 22, 2024

This is a continuation of PR #85 from the now-incorporated matrix-react-sdk, see the discussion there.

Checklist

  • Tests written for new code (and old code if feasible).
  • New or updated public/exported symbols have accurate TSDoc documentation.
  • Linter and other CI checks pass.
  • I have licensed the changes to Element by completing the Contributor License Agreement (CLA)

Purpose

For the "Modern" layout, a bright stripe has been added to the left edge of the highlighted-message background to make mentions/notifications more visible, in the spirit of element-hq/element-meta#1476.
EDIT: This addition has been dropped from this PR, as it needs additional work to adhere to the Compound design system guidelines — I believe it would be best for me to address it in a follow-up PR instead.
For now, disregard the highlighted left edge that appears in the "After" screenshots below.

Before After
Pasted image 20240922225036 Pasted image 20240922225435
Pasted image 20240922225030 Pasted image 20240922225105

Fixes element-hq/element-meta#744
Fixes #8821

I foresee this change being made across the codebase shortly
and want to proactively prevent my PR from falling behind
@taffyko taffyko requested a review from a team as a code owner October 22, 2024 21:46
@taffyko taffyko requested review from t3chguy and robintown October 22, 2024 21:46
@CLAassistant
Copy link

CLAassistant commented Oct 22, 2024

CLA assistant check
All committers have signed the CLA.

res/css/views/rooms/_EventTile.pcss Outdated Show resolved Hide resolved
res/themes/dark/css/_dark.pcss Outdated Show resolved Hide resolved
src/components/views/messages/TextualBody.tsx Outdated Show resolved Hide resolved
It is clear that it would be best for me to address
this piece in a separate PR.
@richvdh
Copy link
Member

richvdh commented Jan 9, 2025

@dbkr's comparison with EX:

  • username pills are green
  • the rest of the message is not highlighted
  • keywords aren't currently highlighted at all

@richvdh
Copy link
Member

richvdh commented Jan 9, 2025

@t3chguy will take this to the design team for guidance

@dbkr
Copy link
Member

dbkr commented Jan 9, 2025

For reference, this is what mention and keywords look like in EX iOS:
IMG_13AE0C952934-1

@t3chguy
Copy link
Member

t3chguy commented Jan 13, 2025

I have requested input from @element-hq/design but did not get anywhere.

@t3chguy
Copy link
Member

t3chguy commented Jan 17, 2025

Hey @taffyko - I managed to get some review from the @element-hq/design team. They are happy to land this but would like the font colour for pills to also be updated to --cpd-color-text-on-solid-primary at the same time. Are you able to get this done? Thanks

@taffyko
Copy link
Contributor Author

taffyko commented Jan 20, 2025

Hey @taffyko - I managed to get some review from the @element-hq/design team. They are happy to land this but would like the font colour for pills to also be updated to --cpd-color-text-on-solid-primary at the same time. Are you able to get this done? Thanks

On it!

@taffyko
Copy link
Contributor Author

taffyko commented Jan 20, 2025

@t3chguy
I've updated with latest develop and tested.
Pills of all types are are already using --cpd-color-text-on-solid-primary for their text color (dark mode and light mode alike), I believe we're all good here!
image
image

Copy link

@gaelledel gaelledel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks very much @taffyko

Copy link
Member

@t3chguy t3chguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks sane to me, thanks!

Comment on lines +268 to +272
private regExpForKeywordPattern(pattern: string): RegExp {
// Reflects the push notification pattern-matching implementation at
// https://github.com/matrix-org/matrix-js-sdk/blob/dbd7d26968b94700827bac525c39afff2c198e61/src/pushprocessor.ts#L570
return new RegExp("(^|\\W)(" + globToRegexp(pattern) + ")(\\W|$)", "i");
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be nice to reuse the cache in the js-sdk for these regexes but not going to block this change on that

@t3chguy t3chguy added this pull request to the merge queue Jan 22, 2025
Merged via the queue into element-hq:develop with commit 68c03db Jan 22, 2025
28 checks passed
@clokep
Copy link

clokep commented Jan 22, 2025

Very excited to see this! Thanks for taking the time to do it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Enhancement Z-Community-PR Issue is solved by a community member's PR
Projects
None yet
7 participants