Repository navigation
docs: move React i18n, connection indicator and styling to Flow - #6626
Conversation
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
left a comment
There was a problem hiding this comment.
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. |
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>
Preview DeploymentThis PR has been deployed for preview. URL: https://docs-preview-pr-6626.fly.dev Changed pagesAdded content is highlighted in green; removed content is marked in red on each page.
Other changed files
Built from bdcb13e |
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
mainof 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 targetsmainonly, so it gets notarget/v25.3label.What changed
flow/i18n/react-views.adoc, Localization in React Views, rewritten from the Hilla i18n guide with compiled examples:i18n.configure(), and how the initial language is chosen;translate()and thekeytag, the missing-translation marker, and ICU parameters compared with Flow'sMessageFormat;translateDynamic(), including the@Menutitles of Flow views;UIlocale;I18NProvidermust implement.flow/advanced/loading-indicator.adoc) now also covers what the Hilla connection indicator page covered:ReconnectDialogConfiguration, which no page documented, with a compiled example;jar-resourcesimport that replaces@vaadin/common-frontendafter refactor: move connection state and indicator into flow-client flow#26714;@StyleSheetstyles, importing CSS files and CSS modules from a view, and the type declarations these imports need.hilla/guides/i18n→flow/i18n/react-viewshilla/reference/connection-indicator→flow/advanced/loading-indicator(the Lit redirect points there too)hilla/guides/styling→styling/stylesheets#react-viewshilla/reference, now empty →flow/react-views(the Lit redirect points there too). This was planned for the last step.articles/hilla/_sharedis removed._sharedpartials, and the feature flag guideline no longer names the Hilla Feature Flags section that docs: move full-stack signals to UI State #6624 removed.!de: key, not as the key.i18n.configure()in an effect. It returns aPromise, and the page awaits it once in the layout.opacity: 0andpointer-events: none. The examples now usevaadin-connection-indicator .v-loading-indicatorand setopacity.@vaadin/common-frontendimport no longer works after refactor: move connection state and indicator into flow-client flow#26714.Test summary
npm run check-redirectspasses.mvn spotless:applyandmvn compilepass.npx eslint frontend/demo/fusion/i18npasses.{0}placeholders, the missing-key marker, on-demand keys and their warning;de-DEtodeand the root file, and the separate Flow locale;getAllTranslations()in development mode (no translations;initializedstaysfalse);offlineevent, and the online message afterwards;The TypeScript configuration snippet for the indicator is inline: the docs build is on 25.4.0-alpha5, whose
Flow.jsstill uses@vaadin/common-frontend, so a compiled example importing the new module wouldn't build yet.Product bugs found during testing, reported separately:
types.d.tsdoesn't declare CSS imports, so with TypeScript 6 the imports in React views fail the type check. The Stylesheets section documents the declarations to add.setLanguage(), a key thattranslateDynamic()loaded on demand stays empty. The page doesn't describe this behavior.🤖 Generated with Claude Code