Repository navigation
Key the pieces of a translated message that holds markup - #2118
Merged
Merged
Conversation
Before: in a Vite dev build, every translated message that mixes text with an element (an icon beside "Add icon", a link inside a sentence) logged "Each child in a list should have a unique key". The atomic-saas portal e2e runs a dev server and fails on any console error, so invite-signup failed on every retry once the wuchale patch of the 6 October batch started extracting such labels in TitleDecorationAffordances. After: those messages render without the warning. The wuchale JSX runtime returned the pieces as an unkeyed array; a pnpm patch wraps each piece in a Fragment keyed by its position. A unit test renders such a message and fails without the patch. The AI settings e2e no longer requires the warning that this fixes.
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.
Before: in a Vite dev build, every translated message that mixes text with an element (the icon beside "Add icon", a link inside a sentence) logs "Each child in a list should have a unique key". The atomic-saas portal e2e runs a dev server and fails on any console error, so
invite-signupfails on every retry. It started with the batch of 6 October (#2085, 30 PRs combined): its wuchale patch now extracts the "Add icon" and "Add cover" labels inTitleDecorationAffordances, which used to stay untranslated plain text.After: those messages render without the warning, so the saas portal e2e no longer trips on it (saas #196, the Firefox scrolling fix, is the PR that hit it). The same fix covers every other message that holds markup.
The wuchale JSX runtime returns the pieces of a message as an array whose elements have no key. A pnpm patch (
@wuchale/jsx@0.12.5) wraps each piece in aFragmentkeyed by its position, which cannot change for a given message.Children.toArraywas tried first and does not help, because React still warns for elements it keys that way.How: the patch is
browser/patches/@wuchale__jsx@0.12.5.patch, registered inpnpm-workspace.yaml, with the lockfile entries added by hand in the repo's existing format and an entry inbrowser/patches/README.md.src/locales/wuchaleRuntime.test.tsxrenders a message with an icon and fails without the patch. The AI settings e2e no longer requires the older Vite-only warning of the same kind.This is the same commit as #2114 (closed), moved to a branch name that no atomic-saas branch shares. That one's main CI job was green on the exact head (e2e, lint, unit test); its Downstream check paired with a stale same-named saas branch and failed on a
--lockederror unrelated to this change.Generated by Claude Code