Skip to content

docs: move React i18n, connection indicator and styling to Flow - #6626

Merged
peholmst merged 2 commits into
mainfrom
claude/react-i18n-indicator-styling
Nov 11, 2026
Merged

peholmst merged 2 commits into
mainfrom
claude/react-i18n-indicator-styling

Conversation

@peholmst

@peholmst peholmst commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Review risk: two-way door. Docs and examples only: one new page, two rewritten or extended pages, five removed pages with redirects, and link and guideline updates. Reverting brings the old pages back.

Summary

Moves React i18n, the connection indicator and React styling from the Hilla section to the Flow Reference and the Styling section. This is the eighth step of dissolving the Hilla section, after #6611, #6616, #6618, #6620, #6621, #6622 and #6624.

Every statement is checked against main of vaadin/hilla and vaadin/flow, and the behavior is checked in a scratch application on 25.4.0-alpha5 with Flow 25.4.0-alpha6, the first Flow release with vaadin/flow#26714. This pull request targets main only, so it gets no target/v25.3 label.

What changed

  • New page flow/i18n/react-views.adoc, Localization in React Views, rewritten from the Hilla i18n guide with compiled examples:
    • loading translations with i18n.configure(), and how the initial language is chosen;
    • translate() and the key tag, the missing-translation marker, and ICU parameters compared with Flow's MessageFormat;
    • translating view titles and menu items with translateDynamic(), including the @Menu titles of Flow views;
    • changing the language, the file fallback, and that the React language is separate from the Flow UI locale;
    • development and production loading, and what a custom I18NProvider must implement.
  • Loading and Connection Indicator (flow/advanced/loading-indicator.adoc) now also covers what the Hilla connection indicator page covered:
    • it covers Flow and React views, the loading bar stages, and the connection status messages;
    • configuration from Java, including ReconnectDialogConfiguration, which no page documented, with a compiled example;
    • configuration from TypeScript, with the jar-resources import that replaces @vaadin/common-frontend after refactor: move connection state and indicator into flow-client flow#26714;
    • styling, with the element structure and states.
  • Stylesheets: a new Stylesheets in React Views section: global @StyleSheet styles, importing CSS files and CSS modules from a view, and the type declarations these imports need.
  • Localization and Custom I18N Provider link to the new page.
  • Removed pages, with redirects:
    • hilla/guides/i18n → flow/i18n/react-views
    • hilla/reference/connection-indicator → flow/advanced/loading-indicator (the Lit redirect points there too)
    • hilla/guides/styling → styling/stylesheets#react-views
    • hilla/reference, now empty → flow/react-views (the Lit redirect points there too). This was planned for the last step.
    • The last partial in articles/hilla/_shared is removed.
  • Links: the Routing page links to the new i18n page.
  • Guidelines: the Hilla paragraph no longer mentions the _shared partials, and the feature flag guideline no longer names the Hilla Feature Flags section that docs: move full-stack signals to UI State #6624 removed.
  • Corrections compared with the old pages, each checked in the scratch application:
    • A missing translation shows as !de: key, not as the key.
    • The old guide wrapped i18n.configure() in an effect. It returns a Promise, and the page awaits it once in the layout.
    • The default first delay of the loading bar is 450 ms, not 300 ms.
    • The old CSS examples didn't show anything with the default theme turned off: the indicator's functional style, which is always present, comes after the application's stylesheets and sets opacity: 0 and pointer-events: none. The examples now use vaadin-connection-indicator .v-loading-indicator and set opacity.
    • The @vaadin/common-frontend import no longer works after refactor: move connection state and indicator into flow-client flow#26714.

Test summary

  • npm run check-redirects passes.
  • mvn spotless:apply and mvn compile pass. npx eslint frontend/demo/fusion/i18n passes.
  • The two TypeScript examples type-check and run in the scratch application, in English and German.
  • Checked with the browser:
    • translations, the ICU plural form, {0} placeholders, the missing-key marker, on-demand keys and their warning;
    • the cookie, the fallback from de-DE to de and the root file, and the separate Flow locale;
    • a custom provider without getAllTranslations() in development mode (no translations; initialized stays false);
    • the loading bar stages during a slow service call, the offline message after a failed call and after the browser's offline event, and the online message afterwards;
    • the reconnecting message of a Flow view with the server stopped;
    • the TypeScript configuration, the Java configuration overriding only the properties it sets, and the corrected curtain CSS;
    • global styles, a plain CSS import that stays loaded after navigating away, and a CSS module.
  • Every cross reference in the new and changed lines resolves.
  • Vale: no errors or warnings on the added and changed lines with the pull request configuration.
  • Asciidoctor renders the changed pages, with all includes and tags resolved.
  • I didn't run a full dspublisher build locally.

The TypeScript configuration snippet for the indicator is inline: the docs build is on 25.4.0-alpha5, whose Flow.js still uses @vaadin/common-frontend, so a compiled example importing the new module wouldn't build yet.

Product bugs found during testing, reported separately:

🤖 Generated with Claude Code

Move the Hilla i18n guide to Flow's Localization section as Localization
in React Views, rewritten for 25.4 with compiled examples. Merge the
connection indicator reference into the Flow loading indicator page,
which now covers both kinds of views, the connection status messages,
configuration from Java and TypeScript (flow#26714), and styling. Add a
Stylesheets in React Views section to the Stylesheets page.

Remove the old Hilla pages, the last _shared partial, and the now empty
Hilla Reference index, with redirects.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@vaadin-review-bot vaadin-review-bot 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.

Reviewed the changes — left 1 comment and collected 1 finding below that could not be attached to the diff.

Finding
⚠️ The Runtime Model page still says the loading indicator appears after 300 ms, but the updated page now says 450 ms.
💬 "A failed call" suggests that a service exception shows "Connection lost", but only network failures do.

⚠️ The Runtime Model page still says the loading indicator appears after 300 ms, but the updated page now says 450 ms.
This PR corrects the default first delay to 450 ms on the Loading and Connection Indicator page. The source agrees: FIRST_DELAY_DEFAULT = 450 in LoadingIndicatorConfigurationMap.java:32, and firstDelay = 450 in ConnectionIndicator.ts. The Runtime Model page links to that page but still says:

If a response takes longer than 300 milliseconds, Vaadin shows a loading indicator.

Suggested fix: "If a response takes longer than 450 milliseconds, Vaadin shows a loading indicator."
runtime-model.adoc:54 · accuracy

The docs build aliases @vaadin/hilla-react-signals to the shim. Vite 5
resolves the .js name to the .ts file only for imports from TypeScript
files, so the import in @vaadin/hilla-react-i18n failed the build.

Also say that only calls that can't reach the server show the offline
text, and correct the loading indicator delay on Runtime Model.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Preview Deployment

This PR has been deployed for preview.

URL: https://docs-preview-pr-6626.fly.dev

Changed pages

Added content is highlighted in green; removed content is marked in red on each page.

Other changed files

  • articles/hilla/guides/i18n.adoc (deleted)
  • articles/hilla/guides/styling.adoc (deleted)
  • articles/hilla/reference/connection-indicator.adoc (deleted)
  • articles/hilla/reference/index.adoc (deleted)
  • articles/hilla/_shared/guides/_styling.adoc (deleted)

Built from bdcb13e

@peholmst
peholmst merged commit 0076477 into main Nov 11, 2026
11 checks passed
@peholmst
peholmst deleted the claude/react-i18n-indicator-styling branch November 11, 2026 13:52
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