Skip to content

Conversation

diondiondion
Copy link
Contributor

@diondiondion diondiondion commented May 14, 2025

References MAS-352
Fixes #34691

Changes proposed in this PR:

  • Removes .avatar-pile class (used on "Edit list" screen) & merges its unique styles (a slight rotation of the first two avatars) into the new .avatar-group--compact class introduced in feat: Add "Followers you know" widget to user profiles #34652
  • Uses AvatarGroup on "Edit list" screen
  • Refactors AvatarGroup to use the children prop rather than accountIds for more flexibility around the rendering of the Avatar component and to avoid having to pass through lots of Avatar-related props. Example of the new component API:
    <AvatarGroup compact>
      {accounts.map((account) => (
        <Avatar key={account.id} account={account} />
      ))}
    </AvatarGroup>
  • Adds a new prop withLink = false to Avatar which wraps the avatar in a link and attaches the hover-card class. (Previously this was part of AvatarGroup)
  • Refactors the <Avatar account /> prop to only require properties that are actually used, allowing the component to be used with data that doesn't come from Redux or Immutability.js
  • Fixes some issues in the Familiar followers widget:
    • Adds a fallback for accounts without a display_name
    • Text link is now the same as the avatar link
  • Drive-by design tweak: Adds an icon and changes the wording of the "List members" link on the "Edit list" screen, to make it more obvious that it can be clicked and isn't just informational

Screenshots

Before After
image image
image image

This commit also refactors the AvatarGroup component so
that the rendering of the avatars is left to the user, and adds
the link wrapper into the Avatar component via the `withLink` prop
@diondiondion diondiondion requested a review from a team May 14, 2025 13:06
@diondiondion diondiondion changed the title refactor: Remove duplicated AvatarGroup CSS refactor: Remove duplicated AvatarGroup CSS and familiar followers cleanup May 14, 2025
@diondiondion diondiondion added this pull request to the merge queue May 15, 2025
Merged via the queue into main with commit ccffa11 May 15, 2025
29 checks passed
@diondiondion diondiondion deleted the familiar-followers-css-cleanup branch May 15, 2025 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Followers you know: link points to the wrong URL
2 participants