Fix user avatar emoji handling
Type
- Bugfix
- Feature
- Documentation
- Refactoring (e.g. Style updates, Test implementation, etc.)
- Other (please describe):
Checklist
- [x] Code updated to current develop branch head
- [ ] Passes CI checks
- [ ] Is a part of an issue
- [ ] Tests added for the bugfix or newly implemented feature, describe below why if not
- [x] Changelog is updated
- [ ] Documentation of code and features exists
Changes
- Fixed emoji handling in user avatar
Other information
The code extracting the first char of the users first/lastname broke emojis.
Before
After
Thanks @tibroc for reporting this bug
Summary by CodeRabbit
- Bug Fixes
- Fixed emoji handling in user avatar display.
Walkthrough
Changelog updated to reference issue #2613 for an emoji handling fix; UserAvatar.vue now imports lodash-es and uses _.split to obtain the first character of firstname/lastname instead of direct string indexing.
Changes
| Cohort / File(s) | Change Summary |
|---|---|
Documentation updates CHANGELOG.md |
Adds "Emoji handling in user avatar ([#2613])" to Unreleased Fixed; replaces reference to [#2616] with [#2613] and adds the corresponding link |
Component refactor resources/js/components/UserAvatar.vue |
Adds lodash-es import and replaces direct first-character extraction from firstname/lastname with _.split(...)[0] usage |
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~12 minutes
- Verify lodash's
splituse handles emoji, surrogate pairs, and other multi-codepoint characters as intended. - Confirm visual/functional output of
UserAvatarunchanged for ASCII, accented, and emoji names. - Check
lodash-esis present in project dependencies and import style matches project conventions.
Pre-merge checks and finishing touches
❌ Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Description check | ⚠️ Warning | The PR description is largely incomplete. It lacks the required 'Fixes #' issue reference at the top, has incomplete checklist items (tests not added, no issue linkage), and missing sections like 'Changelog' validation details and 'Documentation' status. | Add the issue number using 'Fixes #' format at the top. Complete checklist items by checking or explaining unchecked boxes. Clarify why tests were not added and whether documentation updates are needed. |
✅ Passed checks (2 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | The title 'Fix user avatar emoji handling' directly summarizes the main change - fixing emoji handling in user avatars, which matches the primary objective of the changeset. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
✨ Finishing touches
🧪 Generate unit tests (beta)
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
- [ ] Commit unit tests in branch
fix-emoji-handling-user-avatar
📜 Recent review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between 6a5df32767e94180ac75664f1b18d6a2c62a3709 and fc9b1c874dc89d964cdd6a4b61c83c7278887fd2.
📒 Files selected for processing (2)
CHANGELOG.md(2 hunks)resources/js/components/UserAvatar.vue(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- CHANGELOG.md
- resources/js/components/UserAvatar.vue
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Backend
- GitHub Check: Docker Build
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 @coderabbitai help to get the list of available commands and usage tips.
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 96.75%. Comparing base (1b2ec03) to head (fc9b1c8).
:warning: Report is 1 commits behind head on develop.
Additional details and impacted files
@@ Coverage Diff @@
## develop #2613 +/- ##
=============================================
+ Coverage 96.25% 96.75% +0.50%
Complexity 1817 1817
=============================================
Files 257 434 +177
Lines 6215 12485 +6270
Branches 0 2078 +2078
=============================================
+ Hits 5982 12080 +6098
- Misses 233 405 +172
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
PILOS
Run #2712
Run Properties:
Passed #2712 •
fc9b1c874d: Fix user avatar emoji handling
| Project |
PILOS
|
| Branch Review |
fix-emoji-handling-user-avatar
|
| Run status |
|
| Run duration | 06m 49s |
| Commit |
|
| Committer | Samuel Weirich |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
608
|
| View all changes introduced in this branch ↗︎ | |