Skip to content

v5.5.13 - #645

Merged
novykh merged 3 commits into
masterfrom
fix/translation-safe-text
Sep 23, 2026
Merged

novykh merged 3 commits into
masterfrom
fix/translation-safe-text

Conversation

@novykh

@novykh novykh commented Sep 23, 2026

Copy link
Copy Markdown
Member

Problem

Chrome/Safari page translation replaces text nodes with <font> elements. When React later inserts before, or removes, one of those text nodes, it throws NotFoundError and the subtree crashes. Production Sentry traced this to @netdata/charts; the same pattern is being removed across charts and cloud-frontend.

Changes

  • ESLint rule local/translation-safe-text (eslint/rules/translationSafeText.js) that flags conditional text rendered next to other children, e.g. {a ? "x" : ""}{b} or {cond && <X/>}text. The rule file is identical in charts and cloud-frontend.
  • RuleTester tests (eslint/rules/translationSafeText.test.js); jest/config.js roots include eslint/. The test polyfills structuredClone because RuleTester needs it and the jsdom environment does not provide it.
  • No components needed fixing: the rule reports no sites in src.
  • Version bump to 5.5.13.

Note

The repo's ESLint setup does not load today: eslint.config.js imports @eslint/js, which is not a dependency, and eslint-plugin-react 7.37.5 does not support ESLint 10 (context.getFilename is not a function). The rule is wired in and will run once that is fixed; it is not addressed in this PR.

Testing

Full suite: 499/499 passing.

@novykh
novykh merged commit f224f96 into master Sep 23, 2026
1 check passed
@novykh
novykh deleted the fix/translation-safe-text branch September 23, 2026 14:13
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.

2 participants