Skip to content

fix(NcAvatar): orbital best-fit adaptive status icon - #6004

Merged
susnux merged 3 commits into
mainfrom
fix/nc-avatar--scaling
Aug 5, 2025
Merged

fix(NcAvatar): orbital best-fit adaptive status icon #6004
susnux merged 3 commits into
mainfrom
fix/nc-avatar--scaling

Conversation

@ShGKme

@ShGKme ShGKme commented Aug 21, 2024

Copy link
Copy Markdown
Contributor

Resolves

Status icon size

This PR makes the status icon:

    • 💫 Orbital: the status icon's center is positioned on the avatar circle
    • ⏹️ Best-fit: the status icon is as large as possible without exceeding the avatar box
image

Edge case: small avatar

The solution above doesn't work well on a very small avatar. It makes the

  • Status icon size is limited to fit --clickable-area-small avatar
  • The position is moved to keep it orbital
image

🖼️ Screenshots

🏚️ Before 🏡 After
image image
before after

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable
  • 3️⃣ Backport to next requested with a Vue 3 upgrade

@ShGKme ShGKme added bug Something isn't working 2. developing Work in progress feature: avatar Related to the avatar component labels Aug 21, 2024
@ShGKme ShGKme added this to the 8.17.1 milestone Aug 21, 2024
@ShGKme ShGKme self-assigned this Aug 21, 2024
@susnux susnux modified the milestones: 8.17.1, 8.18.0 Aug 30, 2024
@Antreesy Antreesy modified the milestones: 8.18.0, 8.18.1 Sep 12, 2024
@susnux susnux modified the milestones: 8.18.1, 8.19.0, 8.20.0, 8.19.1 Sep 17, 2024
@Antreesy Antreesy modified the milestones: 8.19.1, 8.20.1 Oct 29, 2024
@susnux susnux modified the milestones: 8.21.1, 8.23.0 Jan 15, 2025
@Antreesy Antreesy modified the milestones: 8.23.0, 8.23.2 Feb 13, 2025
@susnux susnux modified the milestones: 8.23.2, 8.24.0 Feb 28, 2025
@ShGKme ShGKme modified the milestones: 8.24.0, 8.25.0 Apr 2, 2025
@susnux susnux modified the milestones: 8.25.0, 8.26.0 Apr 16, 2025
@susnux susnux removed this from the 8.26.0 milestone Apr 27, 2025
@ShGKme

This comment was marked as resolved.

@ShGKme ShGKme added this to the 9.0.0-rc.6 milestone Aug 4, 2025
@ShGKme ShGKme added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Aug 4, 2025
@ShGKme
ShGKme force-pushed the fix/nc-avatar--scaling branch from 8cf3490 to c2ba0b8 Compare August 4, 2025 22:03
@ShGKme
ShGKme changed the base branch from stable8 to main August 4, 2025 22:03
@ShGKme ShGKme changed the title fix(NcAvatar): math-perfect adaptive scaling fix(NcAvatar): orbital best-fit adaptive status icon Aug 4, 2025
@ShGKme
ShGKme requested review from DorraJaouad and susnux August 4, 2025 22:04
@ShGKme
ShGKme marked this pull request as ready for review August 4, 2025 22:05
Comment thread src/components/NcAvatar/NcAvatar.vue Outdated
@ShGKme

This comment was marked as resolved.

ShGKme added 2 commits August 5, 2025 10:46
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
@ShGKme
ShGKme force-pushed the fix/nc-avatar--scaling branch from c2ba0b8 to 4526cf5 Compare August 5, 2025 08:46
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
@ShGKme
ShGKme force-pushed the fix/nc-avatar--scaling branch from 4526cf5 to be27be4 Compare August 5, 2025 08:50

@DorraJaouad DorraJaouad left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I love it 🦅
I had same issue when setting conversation icon in sidebar call, this was my approach with proportions
nextcloud/spreed@332cd35#diff-c9b05a3b55c5db03cb3bfb8c9ca12d8d9380405b7b405e870dfb2ce735c528b3

(it wasn't 100% accurate outside a certain interval)

It would be nice to implement orbital approach for future cases in Talk 👍🏻

@susnux
susnux merged commit 3d28188 into main Aug 5, 2025
25 checks passed
@susnux
susnux deleted the fix/nc-avatar--scaling branch August 5, 2025 18:08
@susnux

This comment was marked as duplicate.

@nextcloud-libraries nextcloud-libraries deleted a comment from backportbot Bot Aug 5, 2025
@susnux

susnux commented Aug 5, 2025

Copy link
Copy Markdown
Contributor

/backport to stable8

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 bug Something isn't working feature: avatar Related to the avatar component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants