Skip to content

Document ICU plurals and selects on the web host - #797

Merged
ashley-hunter merged 1 commit into
ng-native:mainfrom
WassimAarab08:docs/icu-on-web-host
Oct 14, 2026
Merged

ashley-hunter merged 1 commit into
ng-native:mainfrom
WassimAarab08:docs/icu-on-web-host

Conversation

@WassimAarab08

Copy link
Copy Markdown
Contributor

What changed and why

#772 and #773 made ICU plurals and selects work on the web host (in a development build, and picking the case by the app's LOCALE_ID), but the docs were not updated and #686 is still open:

  • guide/limitations.md says a plural or select "throws in a development build" on the web host and recommends the i18nPlural pipe and @switch instead.
  • guide/localization.md limits ICU expressions to iOS and Android and sends web readers to that limitation.

Both pages now say plurals and selects work on iOS, Android and the web host.

The issue covers selects as well as plurals, but plural.test.ts only exercised plurals. This adds a SelectApp fixture and a test that renders a select on the web host in a development build and switches its case both ways.

Closes #686

How this was tested

  • nx run-many -t lint typecheck test -p @ng-native/web documentation passes, and so does pnpm format:check.
  • The new select test passes. With Render an ICU plural on the web host in a development build #773's change to browser-renderer.ts and dom-node.ts reverted, it fails with the error from the issue (ASSERTION ERROR: The provided value must be an instance of a DOM Node but got #anchor), along with the existing plural tests.

Checklist

ng-native#772 and ng-native#773 made ICU plurals and selects work on the web host, in a
development build and by the app's locale, but the localization guide and
the limitations page still say they throw there and point to the
`i18nPlural` pipe and `@switch` instead.

Both pages now say plurals and selects work on iOS, Android and the web
host. A test renders a select on the web host and switches its case both
ways: the existing tests cover plurals only, and a select goes through the
same ICU path that threw before ng-native#773.

Closes ng-native#686
Copilot AI balanced review requested due to automatic review settings October 14, 2026 09:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 882fe44a-c73d-4c36-8f94-1cfa029b7380
📥 Commits

Reviewing files that changed from the base of the PR and between d3b2f68 and aa84c83.

📒 Files selected for processing: 4
  • apps/documentation/src/content/guide/limitations.md
  • apps/documentation/src/content/guide/localization.md
  • packages/web/src/plural-app.ts
  • packages/web/src/plural.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

📝 Walkthrough

The localization and limitations guides now state that plural and select expressions are supported on the web host, as well as iOS and Android. A new fixture and test check that a select expression renders the admin label, changes to the guest label for the visitor role, and returns to the admin label.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Suggested reviewers: erkamyaman

Merge Risk: ⚪ Minimal · up to aa84c

The web-host ICU guidance matches the tested behavior, including select switching and locale-sensitive plurals. No concrete merge-blocking risk remains.

Pre-merge checks: Passed 6
Passed Passed checks: 6 passed
Check name Status Explanation
Description check Passed The description explains the documentation and test changes, states why they are needed, identifies the affected issues, and reports the validation performed. The checklist is complete, with a clear e…
Title check Passed The title clearly summarizes the main change: documenting ICU plurals and selects for the web host.
Linked Issues check Passed Issue #686 is active and directly linked. The reviewed head includes the required web-host behavior. BrowserRendererFactory calls letBrowserNodesPassAsNodes(), and the development-build plural tes…
Out of Scope Changes check Passed The changes stay within issue #686. The documentation edits remove obsolete web-host limitations. The SelectApp fixture and its test verify the issue's select behavior and case switching. No unrelat…
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Compatibility Check Passed The pull request changes only documentation and web-host test fixtures. The diff contains no iOS, Android, native platform, or shared runtime implementation changes. Therefore, it does not introduce a…
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ashley-hunter ashley-hunter left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

good catch! thank you

@ashley-hunter
ashley-hunter merged commit 19b7557 into ng-native:main Oct 14, 2026
13 checks passed
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.

ICU plurals and selects do not work on the web host

3 participants