Skip to content

[i18n] Support user defined component#5337

Merged
thompsongl merged 9 commits intoelastic:masterfrom
thompsongl:5236-i18n
Nov 1, 2021
Merged

[i18n] Support user defined component#5337
thompsongl merged 9 commits intoelastic:masterfrom
thompsongl:5236-i18n

Conversation

@thompsongl
Copy link
Copy Markdown
Contributor

@thompsongl thompsongl commented Oct 29, 2021

Summary

Replaces #5236, which got into a bad git state (cc @ym)

We noticed that Chrome's built-in translation feature will break any page with EuiTable.

After investigation, I found that it's caused by the <Fragment> component used by EuiI18n and React or Chrome Trasnlate can't work together when we're using <Fragment> rather than a real DOM component here.

I see i18next has the option to use a different component and we can use the same approach in Eui to make a workaround. That's what the PR is for.

Reference:

[1] i18next/react-i18next#1254
[2] facebook/react#17256

Checklist

- [ ] Check against all themes for compatibility in both light and dark modes
- [ ] Checked in mobile

- [ ] Checked for accessibility including keyboard-only and screenreader modes

  • A changelog entry exists and is marked appropriately

@thompsongl
Copy link
Copy Markdown
Contributor Author

FWIW I was going to approve the original PR after I added 489d981

@kibanamachine
Copy link
Copy Markdown

Preview documentation changes for this PR: https://eui.elastic.co/pr_5337/

Copy link
Copy Markdown
Contributor

@cee-chen cee-chen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA and basic functionality LGTM! I have some minor comments around the documentation/demo, but they're not blocking

Co-authored-by: Constance <constancecchen@users.noreply.github.com>
@kibanamachine
Copy link
Copy Markdown

Preview documentation changes for this PR: https://eui.elastic.co/pr_5337/

@thompsongl thompsongl merged commit 8393e42 into elastic:master Nov 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants