fix(dashboard): drop the hardcoded ring from the member avatar stack - #445
Draft
harshtandiya wants to merge 1 commit into
Draft
fix(dashboard): drop the hardcoded ring from the member avatar stack#445harshtandiya wants to merge 1 commit into
harshtandiya wants to merge 1 commit into
Conversation
The avatar stack in UserGroup drew a `ring-2 ring-surface-white` on each Avatar to fake separation across the negative overlap. The colour is hardcoded, so it read as an odd border on the hover-tinted team rows and on dark surfaces. Replace the overlap and ring with a plain gap so the avatars use frappe-ui's own colours only. frappe-ui 1.0.0-beta.55 ships no AvatarGroup component, so the stack stays hand-rolled. Closes #431 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016kQ1Dp7xRj9mVNuYGeVYB2
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changed
UserGroupdrew a hardcodedring-2 ring-surface-whiteon eachAvatarto fake separation across its negative overlap (-space-x-1.5). Because the colour was fixed white it read as an odd border on the hover-tinted team rows and on dark surfaces —TeamsPanel.vue:61puts the group on a row withhover:bg-surface-gray-1, which the white ring visibly mismatched.The overlap and the ring are replaced with a plain
gap-1, so the avatars now use frappe-ui's own colours and no hardcoded surface token. Public props (users,max), themax-slicing, the__()"N members" label andaria-hiddenon the decorative stack are all unchanged.Closes #431
Two things for you to decide
1. There is no
AvatarGroupin frappe-ui. The issue asks to "stick to frappe ui avatar group", butfrappe-ui@1.0.0-beta.55(whatdashboard/package.jsonpins) exports onlyAvatar—src/components/Avatar/index.tsexportsAvatarand its types, nothing else. Verified against the installed package and the published tarballs for1.0.0-beta.55,1.0.0-beta.56and0.1.278; none contains anAvatarGroup. So the stack necessarily stays hand-rolled here.That leaves an open choice this PR takes the simpler side of:
gap-1), no ring, no overlap;ring-surface-base. Worth knowing thatsurface-whiteis a retired token: frappe-ui'stailwind/migrate-tokens-v2.jsmapssurface-white→surface-base, and this codebase has largely migrated already, so the old ring was a stale token as well as a visual bug. Asurface-basering would still mismatch on the row's hover tint, though, which is why the spaced row won here.If you specifically wanted the overlapping-stack look, say so and it's a small follow-up — either a local
AvatarGroupcomponent or an upstream contribution to frappe-ui.2. "and colors" —
Avatartakes athemeprop (gray|blue|green|amber|red|violet) for fallback initials, andUserGrouppasses none, so every fallback is the default gray. If the issue meant per-user coloured initials, that's a deliberate feature rather than a bug fix and isn't in this PR. Happy to add it.Other call sites
Grepped
ring-acrossdashboard/src— 5 hits, andUserGroup.vuewas the only one on anAvatar. The rest are legitimate and untouched: a selected-filter chip outline (FilterBar.vue:86), two checkboxfocus:ring-*(CancellationRequestDialog.vue), and afocus-visible:ring-2(EventDetails.vue:201).Demo
No screenshot — the dashboard needs a running Frappe site, unavailable in the environment this was written in. Given this is a purely visual change, and given the open choice above, it genuinely needs a look before merge.
Testing
node_moduleswas installed and the checks genuinely ran:yarn lint(oxlint--deny-warnings) — passedyarn typecheck— passedyarn fmt:check(oxfmt, 318 files) — passedGenerated by Claude Code