Skip to content

feat: add ITEM_MEDIA_SIZE for ItemMedia avatars - #42830

Closed
juliajforesti wants to merge 1 commit into
developfrom
feat/item-media-size
Closed

juliajforesti wants to merge 1 commit into
developfrom
feat/item-media-size

Conversation

@juliajforesti

@juliajforesti juliajforesti commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Proposed changes (including videos or screenshots)

Adds ITEM_MEDIA_SIZE to @rocket.chat/ui-avatar: the avatar size an ItemMedia holds at each list density (condensed, medium, extended), matching the sidebar view modes. Lists migrating to Item size their avatars with it instead of hardcoding x20/x28/x36.

Issue(s)

Part of the Item migration. Used by #42818, #42819, #42820 and #42832, which carry this commit at the bottom until it lands.

Further comments

No consumer yet in this PR; no changeset, since @rocket.chat/ui-avatar is private.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added shared avatar size options for condensed, medium, and extended list densities.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Oct 15, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 026feeb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dionisio-bot

dionisio-bot Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 83c99ed2-a616-49ab-9d58-d71e4bec4ba6
📥 Commits

Reviewing files that changed from the base of the PR and between 881c338 and 026feeb.

📒 Files selected for processing: 2
  • packages/ui-avatar/src/index.ts
  • packages/ui-avatar/src/itemMediaSize.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

⏰ Context from checks skipped due to timeout: 2
  • GitHub Check: Hacktron Security Check
  • GitHub Check: 📦 Build Packages
🔇 Additional comments: 2
packages/ui-avatar/src/itemMediaSize.ts: 1

1-12: LGTM!

packages/ui-avatar/src/index.ts: 1

6-6: LGTM!

Walkthrough

The UI avatar package adds a union of three list density names and maps each name to an avatar size. The package entry point exports the mapping and its type.

Changes

Avatar media sizes

Layer / File(s) Summary
Define and export the density mapping
packages/ui-avatar/src/itemMediaSize.ts, packages/ui-avatar/src/index.ts
Adds the ItemMediaSizeName union and the ITEM_MEDIA_SIZE mapping. The package entry point re-exports both. The mapping is checked against valid avatar sizes and covers each density name.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Feature

Suggested labels: type: feature

Merge Risk: ⚪ Minimal · up to 026fe

This change adds a typed mapping for list-density avatar sizes and exports it. No actionable merge-blocking risk is established by the supplied context.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: adding ITEM_MEDIA_SIZE for ItemMedia avatars.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Errors were encountered while retrieving linked issues.

Errors: 1
  • JIRA integration encountered authorization issues. Please disconnect and reconnect the integration in the CodeRabbit UI.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cubic-dev-ai cubic-dev-ai Bot 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.

No issues found across 2 files

View guided diff | Re-trigger cubic

@coderabbitai coderabbitai Bot added the type: feature Pull requests that introduces new feature label Oct 15, 2026
@codecov

codecov Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.48%. Comparing base (ad08045) to head (026feeb).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop   #42830   +/-   ##
========================================
  Coverage    70.48%   70.48%           
========================================
  Files         5413     5413           
  Lines       229630   229630           
  Branches     41749    41701   -48     
========================================
+ Hits        161846   161860   +14     
+ Misses       62448    62432   -16     
- Partials      5336     5338    +2     
Flag Coverage Δ
e2e 58.91% <ø> (-0.04%) ⬇️
e2e-api 46.14% <ø> (+0.24%) ⬆️
unit 70.95% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ggazzo ggazzo added this to the 8.10.0 milestone Oct 16, 2026
auto-merge was automatically disabled October 20, 2026 13:09

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature Pull requests that introduces new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants