mirror of
https://github.com/makeplane/plane.git
synced 2026-09-01 19:48:42 +02:00
* refactor: migrate web Avatar to @makeplane/propel Avatar
Replace @plane/ui Avatar and AvatarGroup with the published Propel
components across apps/web. 41 files, 51 Avatar sites, 4 group sites.
Propel's size scale is @plane/ui's shifted one step, so every enum maps
with no pixel change: sm(16)->2xs, md(20)->xs, base(24)->sm, lg(28)->md.
Unsized avatars took the old md default and become xs.
Notable mapping decisions:
- name -> alt plus fallback={name?.[0]?.toUpperCase()}, preserving the
initial that @plane/ui derived internally.
- Six numeric px sizes mapped to the nearest enum step. Five are exact;
the notification card avatar moves 42px -> xl (40px).
- Ten classNames removed, as published Propel takes no className. Seven
were already redundant with Propel's base class (shrink-0, bg-layer-1);
the remaining three overrode initials typography, which Propel now sets
per size.
- shape="circle" and fallback colour props dropped; Propel is always
circular and picks initials colours from a fixed palette.
AvatarGroup needs app chrome. @plane/ui defaulted to max={2}, rendering
two avatars plus a +N counter, while Propel's AvatarGroup renders every
child. No call site passed max explicitly, so all four relied on that
default and would have rendered entire member lists. The new
common/avatar-group-overflow.tsx restores the cap around Propel's group.
ButtonAvatars' size prop is narrowed to AvatarGroupSize accordingly;
no caller passes size.
Tooltips are intentionally not migrated. @plane/ui Avatar wrapped itself
in a Tooltip defaulting to on, and Propel has no built-in tooltip, so
roughly 29 direct sites plus the ButtonAvatars subtree lose a tooltip.
ButtonAvatars additionally inverted the flag (showTooltip={!showTooltip}),
so its callers passing false were the ones showing tooltips. Restoring
these is deliberately deferred to a follow-up.
* refactor: use Propel Avatar for AvatarGroup overflow count
Replace the custom CSS +N counter with a Propel Avatar fallback,
matching the Avatar Group overflow pattern. Size still comes from
the group context.