Repository navigation
Conversation
…initions Web builds give every copy of an SVG file the same ids, and screens that are no longer focused stay mounted and hidden. The Business Central icon's gradients then resolved to a copy on a hidden screen, which the browser does not paint, so only the navy background showed. Defining the same ids first in the always-rendered SVGDefinitionsProvider makes every copy resolve to visible definitions, as the empty-state background already does.
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation of Change
On web, the Business Central icon next to "…are imported from your Dynamics 365 Business Central settings" on the Tags and Categories pages shows only its navy background after the admin opens the Accounting page first.
Web builds give every copy of an SVG file the same ids, and the Accounting screen stays mounted and hidden after navigating away. The icon's gradients then resolve to the copy on the hidden Accounting screen, which the browser does not paint. Business Central is the only connection icon whose mark is drawn with gradients.
The empty-state background hit the same problem in #70060, which added
SVGDefinitionsProvider: an always-rendered, zero-size SVG at the app root that defines the gradient under the same id the build generates, so every copy resolves to that visible definition first. This PR adds the Business Central icon's gradients and clip paths to it with the ids the build generates (business-central-icon-square_svg__*). The SVG file is unchanged, so the icon keeps Microsoft's mark. On native the provider renders nothing, as before.This is an alternative to #102552 (solid fills) and #102554 (per-copy ids in a component).
Fixed Issues
$ #99052
PROPOSAL: N/A
Tests
Offline tests
Same as Tests.
QA Steps
Same as Tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari