-
Notifications
You must be signed in to change notification settings - Fork 9
fix: Fix i8n errors by adding spans to button children #1703
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: e57e12b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
packages/components/src/Button.tsx
Outdated
<ProgressBar isIndeterminate aria-label="loading" className={styles.progress} /> | ||
)} | ||
</span> | ||
<span>{children}</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrapped both ProgressBar and chidren with their own spans. I tested this locally and it seems to fix all button related i8n errors.
Size Change: +1 B (0%) Total Size: 526 kB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Several visual regressions in Chromatic. I wonder if this is a worthwhile change and worth the tradeoff (more dom nodes) given it doesn't fully solve the issue as pointed out by the link you shared? That and we would have to update all the other components with similar structure as I doubt button is the only culprit.
Co-authored-by: Naomi Hironaka <[email protected]>
I saw your commit @Niznikr thank you! |
Closing in favor of #1705 |
Summary
https://launchdarkly.atlassian.net/browse/SC-295319
The gonfalon-fe channel receives many i8n errors like so:
This is related to how the react dom gets removed/added by google translate on chrome. Read more about it here.
Related Jira issue: SC-295319: React i8n dom errors