Repository navigation
fix(ui): keep inline shadow hosts phrasing-safe - #468
Conversation
🦋 Changeset detectedLatest commit: b3e726a The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
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 |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
camrun91
left a comment
There was a problem hiding this comment.
Thanks, @abharms! The fix is correct and small, and the tests are good. The CI is green. I have 2 required changes. Both are short doc updates.
1. Required: update the server markup contract in ADR 0010
docs/adr/0010-automatic-shadow-dom-style-isolation.md:104-109
The ADR shows a div host in the server markup. After this change, YouVersionAuthButton, BibleChapterPicker.Root, BibleVersionPicker.Root, Separator, and ProfileAvatar render a span host. The ADR is now not correct for these components. Readers use the ADR as the record of the contract (docs/review-guidelines.md: "Are API changes documented"). This is a fix to a fact, not a change to the decision.
Please add 1 sentence. For example: "Components that can be in phrasing content (YouVersionAuthButton, the picker roots, Separator, ProfileAvatar) use a span host with the same attributes."
2. Required: record the Safari rerun in the validation plan
docs/shadow-dom-isolation-plan.md:157-178
The rollout policy (:14, :122, :199-202) says that a host change needs a new actual-Safari run, and that we keep the completed gate in the validation plan. The PR body says that the run passed (42/42 at 1d1bddb). But the plan still shows YPE-6214 as the last Safari validation.
Please add a short YPE-6218 note with the result only. For example: "YPE-6218 host-tag change: targeted actual-Safari gate repeated and passed; YPE-6214 limitations unchanged."
When these 2 changes are done, I can approve. Thank you!
|
@camrun91 ready for another look. |
Summary
YouVersionAuthButton,BibleChapterPicker.Root, andBibleVersionPicker.Rootwith childlessspanShadow DOM hostsYouVersionAuthButton.ssr.test.tsxfile) plus both picker roots, including the distinct console-diagnostic contracts@youversion/platform-react-uiRequirement evidence
hostElement="span"; the shared default remains unchanged. Reverting any one root todivfails that root's test.<span data-yv-shadow-host="true" style="display:contents"></span>server markup.<p>Before … after</p>Beforeandafter.includeAuthYouVersionProvider, waits foronAllReady, then parses and hydrates the completed output.cannot be a child/descendant of,cannot contain a nested,validateDOMNesting) because same-process rendering can emit unrelated multiple-renderer messages; an inline comment records why. Picker tests retain their blanket console check outsideYouVersionProvider.Review scope
Required outcomes
divtospanNon-goals
ShadowIsolationBoundaryor changing its default hostVerification
At
49abb72(current head):YouVersionAuthButton.ssr.test.tsx,YouVersionAuthButton.test.tsx, andbible-picker-shadow-isolation.test.tsxAt
1d1bddb(before the two test-only follow-up commits):pnpm lint,pnpm typecheck,pnpm build,git diff --check— passedpnpm --filter @youversion/platform-react-ui test:shadow-browser— 42 passed, 4 skipped across 18 filespnpm --filter @youversion/platform-react-ui test:shadow-safari— all 42 focused stories passed in fresh SafariDriver sessions on their first attemptpnpm test— all changed tests passed; six existing Bible-reader tests exceeded their 5-second timeout under local full-suite load (an independent run passed 591/591)The follow-up commits change only tests, so the local browser and Safari runs were not repeated.
Review audits
Standards, Spec, and Compatibility audits at
1d1bddbfound no implementation defect, documented-standard violation, or consumer regression. The follow-up commits address their test findings: the auth host is asserted childless, the picker host position is asserted, the dead diagnostic pattern is fixed, and the auth SSR test runs in its own file so its multiple-renderer output no longer reaches other auth tests.Known remaining gaps, not addressed here:
display:contentsfor these three hosts (identical code path fordivandspan)bible-chapter-picker.test.tsxandbible-version-picker.test.tsxuseReuseShadowBoundary, so only the isolation test and shadow stories exercise the standalonespanhostdivordinary-boundary host (non-goal above)<tr>) still reparents; aspanhost cannot fix that, and the ticket scopes the fix to phrasing contentJira
YPE-6218


Confidence Score: 5/5
The PR appears safe to merge.Summary
Changes
YouVersionAuthButtonand both picker roots to childlessspanhosts so server-rendered paragraphs stay intact.Reviews (4) · Last reviewed commit: "docs(ui): record phrasing host validatio..." · Reviewed by Greptile