Skip to content

[CP Staging] Fix Season F1 custom avatars rendering partially black in Share QR code - #96324

Merged
roryabraham merged 3 commits into
mainfrom
nicolas-fix-share-qr-avatar-black-fill
Jul 16, 2026
Merged

roryabraham merged 3 commits into
mainfrom
nicolas-fix-share-qr-avatar-black-fill

Conversation

@NicolasBonet

@NicolasBonet NicolasBonet commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

After #96112, catalog-backed avatars (agent, default user, and Season F1 custom avatars) render in the center of the Share QR code from their bundled local SVG via the svgLogo prop. react-native-qrcode-svg's LogoSVG always spreads its fill prop onto that component — even when it's undefined. Spreading fill={undefined} onto the SVG root erases root attributes like fill="none".

The Season F1 custom avatars rely on that root fill="none": they contain stroke-only paths with no explicit fill of their own. With the attribute erased, those paths fall back to SVG's default fill (black), which made those avatars render partially black in the QR code. Agent and numbered default avatars were unaffected because every one of their paths gets its fill from CSS classes.

This change wraps the local avatar logo in a small module-level component that only forwards fill when it's actually set. The wrapper is scoped to ShareCodePage; the workspace share QR (which always provides svgLogoFillColor) and all other QR usages are untouched, and the offline behavior added by #96112 is preserved for all catalog avatars.

Fixed Issues

$ #96254

Tests

  1. Go to Account > Profile.
  2. Click the profile avatar and select a Season F1 custom avatar that has outlined artwork (e.g. the gas pump on the tangerine background), then click Save.
  3. Click Share.
  4. Verify the avatar in the center of the QR code renders with its correct colors and no black shapes.
  5. Repeat steps 2-4 with a numbered default avatar and with an Agent avatar, and verify both render correctly.
  6. Open a workspace's Share page and verify the workspace default avatar still renders correctly in the QR code.
  • Verify that no errors appear in the JS console

Offline tests

  1. Select a Season F1 custom avatar and save it (while online).
  2. Go offline.
  3. Open Account > Profile > Share.
  4. Verify the avatar still renders in the center of the QR code with its correct colors.

QA Steps

Same as tests.

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

MacOS: Chrome / Safari CleanShot 2026-07-16 at 10 38 37 CleanShot 2026-07-16 at 10 40 58

The QR library's LogoSVG always spreads its fill prop onto the SVG logo
component. When no logo color is provided, fill={undefined} erases root
attributes like fill="none", so avatars with stroke-only paths (the
Season F1 custom avatars) fall back to SVG's default black fill.

Wrap catalog-backed avatar logos so fill is only forwarded when set.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@NicolasBonet
NicolasBonet requested review from a team as code owners July 16, 2026 15:36
@melvin-bot
melvin-bot Bot requested review from bernhardoj and heyjennahay and removed request for a team July 16, 2026 15:36
@melvin-bot

melvin-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown

@bernhardoj Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot
melvin-bot Bot removed request for a team and heyjennahay July 16, 2026 15:36
@codecov

codecov Bot commented Jul 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
src/pages/ShareCodePage.tsx 81.08% <100.00%> (+6.79%) ⬆️
... and 30 files with indirect coverage changes

NicolasBonet and others added 2 commits July 16, 2026 10:52
The QR logo wrapper only forwards an explicitly set fill so stroke-only
avatar SVGs keep their fill="none" root attribute; cover both fill
branches and the URL fallback for non-catalog avatars.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@NicolasBonet
NicolasBonet requested a review from roryabraham July 16, 2026 16:30
@roryabraham

Copy link
Copy Markdown
Contributor

tests well

image

@roryabraham
roryabraham merged commit 5b36cf8 into main Jul 16, 2026
33 checks passed
@roryabraham
roryabraham deleted the nicolas-fix-share-qr-avatar-black-fill branch July 16, 2026 16:41
@NicolasBonet NicolasBonet changed the title Fix Season F1 custom avatars rendering partially black in Share QR code [CP Staging] Fix Season F1 custom avatars rendering partially black in Share QR code Jul 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🚧 roryabraham has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify OSBotify added the CP Staging marks PRs that have been CP'd to staging label Jul 16, 2026
NicolasBonet pushed a commit that referenced this pull request Jul 16, 2026
…black-fill

Fix Season F1 custom avatars rendering partially black in Share QR code

(cherry picked from commit 5b36cf8)

(cherry-picked to staging by roryabraham)
@os-botify os-botify Bot mentioned this pull request Jul 16, 2026
38 tasks done
NicolasBonet pushed a commit that referenced this pull request Jul 16, 2026
…black-fill

Fix Season F1 custom avatars rendering partially black in Share QR code

(cherry picked from commit 5b36cf8)

(cherry-picked to staging by roryabraham)
jasperhuangg added a commit that referenced this pull request Jul 16, 2026
…520108581-1

🍒 Cherry pick PR #96324 to staging 🍒
@OSBotify OSBotify mentioned this pull request Jul 16, 2026
94 tasks done
@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Cherry-picked to staging by https://github.com/roryabraham in version: 9.4.35-6 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@MelvinBot

Copy link
Copy Markdown
Contributor

🤖 I reviewed the changes in this PR against the help site articles under App/docs/articles.

No help site changes are required.

This PR is a visual bug fix: catalog-backed avatars (Season F1 custom, numbered default, and Agent avatars) were rendering partially black in the center of the Share QR code because the QR library spread an undefined fill prop onto the logo SVG, erasing its root fill="none". The fix wraps the local avatar logo so fill is only forwarded when it's actually set, restoring correct colors.

The change is scoped to src/pages/ShareCodePage.tsx (plus a unit test) and only corrects rendering to what users already expect. It introduces no new feature, workflow, setting, UI label, or user-facing behavior change. The existing help articles that reference QR codes (e.g. workspace sharing / joining a workspace) describe how to use QR codes to share and join, not the visual rendering of avatars within them — so none of them are affected.

Since no changes are needed, I have not created a draft help site PR.

@NicolasBonet, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR Ready for review

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Cherry-picked to staging by https://github.com/roryabraham in version: 9.4.36-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.4.35-6 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@MelvinBot

Copy link
Copy Markdown
Contributor

Help site review: no changes required

I reviewed the changes in this PR and no updates to the help site files under docs/articles are required, so I did not create a draft docs PR.

Why: This PR is a purely internal rendering bug fix. It wraps the profile QR logo in a small wrapper component (createAvatarQRLogo) so the QR library only forwards the fill prop when it's actually set, which stops Season F1 custom avatars (stroke-only SVGs relying on root fill="none") from rendering partially black in the Share QR code. There is:

  • No new or changed user-facing feature or workflow
  • No new/renamed tabs, settings, or button labels
  • No change to how a user shares their code — only the pixels rendered in the center of the existing QR code are corrected

I checked the help articles that reference QR codes (workspace join flows, Two-Factor Authentication, etc.) and none of them document avatar appearance inside the Share QR code, so nothing there is now inaccurate.

@NicolasBonet, since no help site PR was created, please confirm you agree that this rendering fix doesn't require any docs/articles updates. If you believe a docs change is warranted, let me know and I'll draft one.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Cherry-picked to staging by https://github.com/roryabraham in version: 9.4.38-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 cancelled 🔪
🍎 iOS 🍎 cancelled 🔪

@MelvinBot

Copy link
Copy Markdown
Contributor

🤖 Help site review: no changes required

I reviewed the changes in this PR against Expensify's help site files under docs/articles, and no documentation updates are needed.

Why: This is a purely visual bug fix. It changes how the QR-code library forwards the fill prop onto the centered avatar SVG so that Season F1 custom avatars (stroke-only artwork) no longer render partially black in the Share QR code. It does not add, remove, or change any user-facing feature, workflow, setting, tab, button, or label.

The help articles that mention the Share/QR code feature (e.g. Chat-Features-and-Moderation-Tools.md, Managing-Workspace-Members.md, and the workspace-join getting-started articles) describe how to share via link or QR code — none document the visual appearance of the avatar rendered inside the QR code, so the fix is transparent to those docs.

Because no changes are required, I did not create a draft help site PR.

@NicolasBonet, if you believe a documented behavior actually did change and a docs update is warranted, let me know and I'll draft the PR.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Cherry-picked to staging by https://github.com/roryabraham in version: 9.4.40-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@MelvinBot

Copy link
Copy Markdown
Contributor

🤖 No help site changes required.

I reviewed the changes in this PR and confirmed no updates are needed to the help site files under docs/articles.

Why: This is a purely visual bug fix. It restores correct color rendering of catalog-backed avatars (Season F1 custom, numbered default, and Agent avatars) in the center of the Share QR code by only forwarding the fill prop to the local avatar SVG when it's actually set — preventing fill=undefined from erasing the SVG root's fill="none".

There is no change to any user-facing feature, workflow, setting label, button, or documented behavior. The QR code and avatar sharing behavior is unchanged from the user's perspective — it simply renders correctly again. The existing help articles that mention QR codes (e.g. workspace join flows) and profile photos/avatars don't document the internal rendering of an avatar inside a QR code, so there's nothing to add or correct.

Since no documentation changes are warranted, I did not create a draft PR.

@NicolasBonet, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR Ready for review

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/yuwenmemon in version: 9.4.40-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Bundle Size Analysis (Sentry):

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

Labels

CP Staging marks PRs that have been CP'd to staging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants