Skip to content

Conversation

@DorraJaouad
Copy link
Contributor

@DorraJaouad DorraJaouad commented Sep 9, 2025

☑️ Resolves

  • With size below 14px, it becomes visually hard to see emoji.

🖼️ Screenshots

🏚️ Before 🏡 After
image image
image image

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable
  • 2️⃣ Backport to stable8 for maintained Vue 2 version or not applicable

@DorraJaouad DorraJaouad added this to the 9.0.0-rc.9 milestone Sep 9, 2025
@DorraJaouad DorraJaouad self-assigned this Sep 9, 2025
@DorraJaouad DorraJaouad added 3. to review Waiting for reviews feature: avatar Related to the avatar component accessibility Making sure we design for the widest range of people possible, including those who have disabilities labels Sep 9, 2025
ShGKme
ShGKme previously approved these changes Sep 9, 2025
@susnux
Copy link
Contributor

susnux commented Sep 9, 2025

So the status icon is hidden if the avatar is below 50px? Then this is a no go as this will break many places, it must at least work with default clickable area (34px) avatar size.

@DorraJaouad
Copy link
Contributor Author

So the status icon is hidden if the avatar is below 50px?

No, it is just bigger from 11px -> around 14px

@susnux
Copy link
Contributor

susnux commented Sep 9, 2025

Or maybe I read it wrong, it sets the min size?
So it will not longer be perfectly an orbit?

Then we need to fix this in a different way (the original issue) as this then breaks again some places where it was fixed by the original PR.

@Antreesy
Copy link
Contributor

Antreesy commented Sep 9, 2025

Also it's cropped on 'After' screenshot 🙈

IMO we should define a minimum size of an icon, and 'break' orbital rule the way, that icon is moving slightly inside the avatar, not going out of square frame

// Limit the status icon size to the status of a 50px avatar
// Ideally avatars with a smaller should not be used with the status icon at all
--avatar-status-size-min: calc(var(--default-clickable-area) * (1 - 1 / sqrt(2)));
--avatar-status-size-min: calc(50px * (1 - 1 / sqrt(2)));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is more than 14px, why a random number like 50px?
I think it makes more sense to use either clickable area large which is a value you might choose for the avatar when not using magic numbers:

Suggested change
--avatar-status-size-min: calc(50px * (1 - 1 / sqrt(2)));
--avatar-status-size-min: calc(var(--clickable-area-large) * (1 - 1 / sqrt(2)));

Or because you want to limit the emoji to a readable size, then you do not need the avatar size here at all but just use the min. accessible size:

Suggested change
--avatar-status-size-min: calc(50px * (1 - 1 / sqrt(2)));
--avatar-status-size-min: var(--font-size-small);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

font size seems to be optimal

@susnux
Copy link
Contributor

susnux commented Sep 9, 2025

IMO we should define a minimum size of an icon, and 'break' orbital rule the way, that icon is moving slightly inside the avatar, not going out of square frame

Yes that exactly is my problem with this change here, because it will break server styles again.
Where we need the avatar to fit in a square with status icon when the avatar has a size of --default-clickable-area.

I think the best solution is to limit the icon size to --font-size-small which is the smallest size for icons and text.
And then calculate the icon position based on the icon size which can be simplified to just set the insets both to 0px so it will always be on the correct location and for larger avatars the orbital behavior is preserved.

Signed-off-by: Dorra Jaouad <dorra.jaoued7@gmail.com>
@DorraJaouad DorraJaouad force-pushed the fix/noid/avatar-status-visual-accessibility branch from c3b58f7 to 07e9135 Compare September 9, 2025 08:59
@Antreesy Antreesy requested a review from ShGKme September 9, 2025 09:07
@ShGKme ShGKme dismissed their stale review September 9, 2025 09:20

State changed

@ShGKme
Copy link
Contributor

ShGKme commented Sep 9, 2025

Then we probably need to only show the status when the avatar is not too small.

image

@ShGKme
Copy link
Contributor

ShGKme commented Sep 9, 2025

Also, initials overlap the status

Copy link
Contributor

@susnux susnux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to work fine now also for default clickable area

@susnux
Copy link
Contributor

susnux commented Sep 9, 2025

Also, initials overlap the status

But not related to this PR, the order of elements is wrong, the status icon element should be the last one.

@ShGKme
Copy link
Contributor

ShGKme commented Sep 9, 2025

But not related to this PR

Kind of related. It became more visible with the new position and size on the status icon.

Copy link
Contributor

@Antreesy Antreesy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added lib screenshots. Fixing initials would be moving 10 lines around, so shouldn't be a problem

@DorraJaouad
Copy link
Contributor Author

/backport to stable8

@DorraJaouad DorraJaouad merged commit 4178923 into main Sep 9, 2025
25 checks passed
@DorraJaouad DorraJaouad deleted the fix/noid/avatar-status-visual-accessibility branch September 9, 2025 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews accessibility Making sure we design for the widest range of people possible, including those who have disabilities feature: avatar Related to the avatar component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants