-
Notifications
You must be signed in to change notification settings - Fork 52
feat(dm-list-group-avatars): show group DM avatars #816
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
Closed
Just-Insane
wants to merge
7
commits into
SableClient:dev
from
Just-Insane:feat/dm-list-group-avatars
Closed
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1a6aba1
feat(dm-list): show group DM avatars
Just-Insane c600d71
fix(dm-list): clean up listener and profile loading lifecycle
Just-Insane 29ae5b4
fix(dm-list): seed group DM avatars synchronously to prevent flash
Just-Insane e33ab68
chore: add changeset
Just-Insane 6066ec0
fix(dm-list): address Copilot review feedback
Just-Insane c8158f8
fix(dm-list-group-avatars): scale composite avatar properly in hideTe…
Just-Insane 8609592
style: fix formatting
Just-Insane File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| default: minor | ||
| --- | ||
|
|
||
| Show group DM composite avatars in the sidebar DM list. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,86 @@ | ||
| import { style } from '@vanilla-extract/css'; | ||
| import { config } from 'folds'; | ||
| import { color, config } from 'folds'; | ||
|
|
||
| export const CategoryButton = style({ | ||
| flexGrow: 1, | ||
| }); | ||
| export const CategoryButtonIcon = style({ | ||
| opacity: config.opacity.P400, | ||
| }); | ||
|
|
||
| /** | ||
| * Group DM multi-avatar layout for the nav item's Avatar size="200" (24 px) slot. | ||
| * Three mini avatars are stacked in a triangle: top-centre, bottom-left, bottom-right. | ||
| */ | ||
| export const GroupAvatarRow = style({ | ||
| position: 'relative', | ||
| // Match the Avatar size="200" footprint so layout is not disrupted. | ||
| width: '24px', | ||
| height: '24px', | ||
| flexShrink: 0, | ||
| }); | ||
|
|
||
| export const GroupAvatarMini = style({ | ||
| position: 'absolute', | ||
| width: '14px', | ||
| height: '14px', | ||
| border: `1.5px solid ${color.Surface.Container}`, | ||
| borderRadius: '50%', | ||
| overflow: 'hidden', | ||
| selectors: { | ||
| '&:nth-child(1)': { | ||
| top: '0', | ||
| left: '50%', | ||
| transform: 'translateX(-50%)', | ||
| zIndex: 3, | ||
| }, | ||
| '&:nth-child(2)': { | ||
| bottom: '0', | ||
| left: '0', | ||
| zIndex: 2, | ||
| }, | ||
| '&:nth-child(3)': { | ||
| bottom: '0', | ||
| right: '0', | ||
| zIndex: 1, | ||
| }, | ||
| }, | ||
| }); | ||
|
|
||
| /** | ||
| * Scaled-up variant used when the nav item is in hideText (icon-only) mode. | ||
| * Matches the Avatar size="300" (32 px) slot; minis are proportionally larger. | ||
| */ | ||
| export const GroupAvatarRowHideText = style({ | ||
| position: 'relative', | ||
| width: '32px', | ||
| height: '32px', | ||
| flexShrink: 0, | ||
| }); | ||
|
|
||
| export const GroupAvatarMiniHideText = style({ | ||
| position: 'absolute', | ||
| width: '18px', | ||
| height: '18px', | ||
| border: `2px solid ${color.Surface.Container}`, | ||
| borderRadius: '50%', | ||
| overflow: 'hidden', | ||
| selectors: { | ||
| '&:nth-child(1)': { | ||
| top: '0', | ||
| left: '50%', | ||
| transform: 'translateX(-50%)', | ||
| zIndex: 3, | ||
| }, | ||
| '&:nth-child(2)': { | ||
| bottom: '0', | ||
| left: '0', | ||
| zIndex: 2, | ||
| }, | ||
| '&:nth-child(3)': { | ||
| bottom: '0', | ||
| right: '0', | ||
| zIndex: 1, | ||
| }, | ||
| }, | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.