Jc/update avatar component#2508
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe avatar edit UI now uses revised checkbox and label controls, optional file-field IDs, consolidated CSS state selectors, and a full-screen overlay cover. The template adds a return icon and removes obsolete close-button reset handling. ChangesAvatar editing controls and template support
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related issues
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@static/css/v3/user-profile-page.css`:
- Around line 207-214: The delete-state selector in user-profile__avatar-row
only hides the avatar image and action buttons, so if the replace panel is
already open it can remain visible when both checkboxes are checked. Update the
delete-state rule in the avatar delete-checkbox branch to also hide the
replacement panel/card that is controlled by the replace flow, using the
existing avatar row and replacement panel selectors so delete always wins over
replace.
In `@templates/v3/user_profile_edit.html`:
- Line 108: The accessible name on the Undo Changes control is incorrect because
the `label` for `user-profile__avatar-delete-checkbox` uses `aria-label="Delete
Avatar"` and overrides the visible text. Update the `label` in the
`user_profile_edit` template so its accessible name matches the displayed
action, or remove the conflicting aria-label entirely if the visible text is
sufficient. Make sure the `Undo Changes` control announced by assistive tech
matches its actual purpose.
- Around line 103-112: The avatar upload section is rendering two file inputs
through the same `_field_file.html` partial with the same generated id, so the
“Replace Image” label can target the wrong control. Update the
`user_profile_edit.html` usage of `_field_file.html` so each avatar file input
gets a distinct id (for example by adding an explicit id parameter to the
partial or making the empty-state field non-labelable), and ensure the labels in
the avatar controls continue to point to the intended input.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 76905191-5c22-43fc-a6ad-fbc03f0759fb
📒 Files selected for processing (3)
static/css/v3/user-profile-page.csstemplates/includes/icon.htmltemplates/v3/user_profile_edit.html
ycanales
left a comment
There was a problem hiding this comment.
Worked as intended and persisting the changes is out of scope for this ticket. Have wo comments but they're not blockers. Approving :)
| <input type="checkbox" id="user-profile__avatar-row-checkbox" name="avatar-row-checkbox" class="badge-button__radio" /> | ||
| {% include 'v3/includes/_field_file.html' with name=user_profile_form.avatar.name extra_class='user-profile__empty-avatar-input' accept='image/png,image/jpeg' only %} | ||
| <div class="user-profile__default-space-col user-profile__default-avatar-buttons"> | ||
| <label for="user-profile__avatar-row-checkbox" class="btn btn-primary">Replace Avatar<span class="btn-icon" aria-hidden>{% include 'includes/icon.html' with icon_name='pixel-pencil' icon_size=16 icon_viewbox='0 0 16 16' only %}</span></label> |
| <div class="user-profile__default-space-col user-profile__activated-avatar-buttons"> | ||
| <div class="user-profile__avatar-edit-button-row"> | ||
| <label aria-label="Save Avatar Change" id="avatar-row__save-button" for="user-profile__avatar-row-checkbox" class="btn btn-primary"><span class="btn-icon" aria-hidden>{% include 'includes/icon.html' with icon_name='pixel-pencil' icon_size=16 icon_viewbox='0 0 16 16' only %}</span></label> | ||
| <label aria-label="Reset Avatar Change" id="avatar-row__close-button" for="user-profile__avatar-row-checkbox" class="btn btn-primary"><span class="btn-icon" aria-hidden>{% include 'includes/icon.html' with icon_name='pixel-trash' icon_size=16 icon_viewbox='0 0 16 16' only %}</span></label> |
There was a problem hiding this comment.
Since the mechanism changed, do we need to clean up the avatarRowClose lines in v3/user_profile_edit.html ?


Issue: #2496
Summary & Context
Updates the Avatar Component to match with the updated design and styling.
Changes
Please list any potential risks or areas that need extra attention during review/testing
Screenshots
Empty State:
Filled State:
Edit State:
Delete State:
Self-review Checklist
Frontend
Summary by CodeRabbit
New Features
pixel-arrow-returnicon.idvalue.UI Improvements