-
Notifications
You must be signed in to change notification settings - Fork 429
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(chat): Conversation avatar for mention chips #9383
fix(chat): Conversation avatar for mention chips #9383
Conversation
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
src/components/MessagesList/MessagesGroup/Message/MessagePart/Mention.vue
Show resolved
Hide resolved
isDarkTheme() { | ||
return window.getComputedStyle(document.body) | ||
.getPropertyValue('--background-invert-if-dark') === 'invert(100%)' | ||
}, |
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.
nitpick: This should not be computed effect
- It's not computed by design, there is no reactive dependencies in the computing
- A little bit more memory (it creates Watcher for reactivity and etc here)
- Each
Mention
instance creates and compute it's own copy ofisDarkTheme
Proposal: make a constant outside of this component (just outside of component definition export default {}
in this module or in a some common for reuse).
.mention-bubble__icon.icon-group-forced-white, | ||
.tribute-container .icon-group-forced-white { | ||
background-image: url(../img/icon-contacts-white.svg); | ||
} | ||
|
||
.mention-bubble__icon.icon-user-forced-white, | ||
.tribute-container .icon-user-forced-white { | ||
background-image: url(../img/icon-user-white.svg) | ||
} |
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.
thought: Not a part of this PR
mention-bubble__icon
is some internal class from @nextcloud/vue
lib and not a part of public API. As this file with libraries overrides became bigger and bigger, I'd think about more safe alternative.
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.
☑️ Resolves
🖼️ Screenshots
🚧 Tasks
🏁 Checklist
docs/
has been updated or is not required