platform: serve /platform/ from Nuxt - #5782
Conversation
✅ Deploy Preview for flowfuse-website ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
3b411a9 to
fb1994b
Compare
fb1994b to
ed6fb76
Compare
ed6fb76 to
4b32ffb
Compare
|
Rebased on Two fixes from a review pass over the whole migration:
Also dropped a bullet from the page comments on |
4b32ffb to
4d83c04
Compare
|
Rebased onto |
4 routes move off 11ty: /platform/dashboard/, /device-agent/, /why-flowfuse/ and /security/. Two pieces of /platform/dashboard/ come out as components, because both were DOM scripts and both are better as state: - <DashboardThemePreview>, the five-theme mock dashboard. The .njk switched presets with setAttribute and built the event table by assigning an innerHTML string. The timestamps are formatted after mount, not during SSR, so Intl resolves against the visitor's locale rather than the build machine's. - <DashboardMigrationImporter>, the Dashboard 1.0 flow importer. This fixes a real bug: the .njk kept the chosen file only in the <input>, so a DROPPED file showed its name and then posted nothing (the FileList it read is truthy even when empty, and the `d1Flow` fallback was never assigned). Drag-and-drop works now, and a failed conversion says so instead of only logging. <HubSpotForm> gained a `submitted` event for that gate, matching the `onFormSubmitted` hook hs-form.njk had. BlogFaq's answer renderer moved to nuxt/lib/faq-answer.mjs, unit tested, and gained *italic*, **bold** and blank-line paragraphs. /platform/device-agent/'s answers needed all three: they were raw <a>, <i> and <p> tags under `| safe`. <DeviceAgentInstallCommands> replaces the install-commands partial and its hand-rolled copy script, using <FfCommand> - whose own comment names src/platform/device-agent.njk as the markup it replaces. /node-red/ will use the same component. /platform/why-flowfuse/ served MES's <title> and meta description in production: its frontmatter carried MES's whole meta block verbatim. That is fixed rather than carried forward. /platform/dashboard/ and /device-agent/ also each rendered a second, empty <h1> from layouts/page.njk's `nohero` branch. Only the real heading survives. The dashboard hero and footer CTAs were hand-written ff-btn links, so most fired no event at all. They go through CtaBookDemo/CtaPricing/CtaSignUp now, which means the sign-up button reads the registry's "Try it out" rather than the hand-typed "Try it out ->".
4d83c04 to
ef0babb
Compare
|
Nothing to change here, one note. It was flagged on three of these PRs and is actually missing on eight, so it is fixed in one place in #5815 rather than eight conflicting edits to the same file. Merge that one after this, since registering a section before its pages land points dev at a Nuxt route that does not exist yet. |
Without the prefix the dev middleware keeps proxying to 11ty, so npm run dev shows the old page. The middleware returns early unless NODE_ENV is development, which is why CI and the deploy preview both looked correct.
|
Correction to my earlier comment: #5815 is closed, the registration belongs in each migration PR instead. Pushed here. |
# Conflicts: # nuxt/content.config.ts # nuxt/nuxt.config.ts # nuxt/server/middleware/legacy.ts
|
Conflicts resolved, main is merged in. Same shape as the other migration PRs: the registry files take the union, so |
# Conflicts: # nuxt/server/middleware/legacy.ts
# Conflicts: # nuxt/nuxt.config.ts # nuxt/server/middleware/legacy.ts
# Conflicts: # nuxt/nuxt.config.ts # nuxt/server/middleware/legacy.ts
|
@Yndira-E @KristopherLeads PR conflicts are resolved. |
…pe-to-production ima (#5848) Co-authored-by: macroscopeapp[bot] <170038800+macroscopeapp[bot]@users.noreply.github.com>
…io on why-flowfuse p (#5849) Co-authored-by: macroscopeapp[bot] <170038800+macroscopeapp[bot]@users.noreply.github.com>

Description
Moves
/platform/to Nuxt: the security, device agent, why-flowfuse and dashboard pages.The Dashboard 1.0 importer keeps its gate on HubSpot's
onFormSubmitted, so the conversion still fires only on a real submission.Related Issue(s)
Part of #5777
Checklist
Note
Serve
/platform/pages from Nuxtdashboard,device-agent,security, andwhy-flowfuse— to Nuxt page components under nuxt/pages/platform/, composing new and shared components for hero sections, FAQ, migration importers, theme previews, and install commands.DashboardMigrationImporter,DashboardThemePreview,DeviceAgentInstallCommands; updatesHubSpotFormto emit asubmittedevent andLiteYoutubeto declare its external assets viauseHeadduring SSR.platformPagescontent collection in nuxt/content.config.ts and moves the security statement to nuxt/content/platform/security.md; adds the four platform routes to the prerender list in nuxt/nuxt.config.ts./platformin the Nuxt route prefixes, and deletes the old src/_data/dashboard.json.legacy.tsnow treats all/platform/*paths as Nuxt routes; any 11ty-side pages or data consumers expecting those paths under the old fallback will no longer receive them.Macroscope summarized 62cfc47.