Skip to content

platform: serve /platform/ from Nuxt - #5782

Merged
ZJvandeWeg merged 10 commits into
mainfrom
nuxt/platform
Sep 24, 2026
Merged

ZJvandeWeg merged 10 commits into
mainfrom
nuxt/platform

Conversation

@dimitrieh

@dimitrieh dimitrieh commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

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

  • I have read the contribution guidelines
  • I have considered the performance impact of these changes
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
  • For blog PRs, an Art Request has been created (instructions)

Note

Serve /platform/ pages from Nuxt

  • Ports four 11ty platform pages — dashboard, device-agent, security, and why-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.
  • Adds supporting components: DashboardMigrationImporter, DashboardThemePreview, DeviceAgentInstallCommands; updates HubSpotForm to emit a submitted event and LiteYoutube to declare its external assets via useHead during SSR.
  • Configures a platformPages content 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.
  • Updates nuxt/server/middleware/legacy.ts to include /platform in the Nuxt route prefixes, and deletes the old src/_data/dashboard.json.
  • Behavioral Change: the legacy middleware in legacy.ts now 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.

@netlify

netlify Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for flowfuse-website ready!

Name Link
🔨 Latest commit 62cfc47
🔍 Latest deploy log https://app.netlify.com/projects/flowfuse-website/deploys/6ab506152a3b580007211ec1
😎 Deploy Preview https://deploy-preview-5782--flowfuse-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 45 (🟢 up 12 from production)
Accessibility: 95 (no change from production)
Best Practices: 92 (no change from production)
SEO: 92 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@dimitrieh

Copy link
Copy Markdown
Contributor Author

Rebased on main.

Two fixes from a review pass over the whole migration:

  • <CtaSignUp ... icon /> on /platform/why-flowfuse/ rendered no icon. icon is typed string, so a value-less attribute resolves to "", not true, and UButton gets an empty trailing-icon. Every other call site in the repo writes icon="i-lucide-arrow-right"; this one now does too.
  • Both <LiteYoutube> titles ended in "- YouTube video", which the component appends itself, so the accessible name was doubled.

Also dropped a bullet from the page comments on why-flowfuse.vue and device-agent.vue claiming the 11ty layout emitted an empty second <h1>. It did not: layouts/page.njk guards the whole hero on {% if (title and not hideTitle) %} and neither .njk sets a title, so no heading was emitted at all.

@dimitrieh

Copy link
Copy Markdown
Contributor Author

Rebased onto main. The conflicts in nuxt/server/middleware/legacy.ts and nuxt/nuxt.config.ts are resolved and CI is green.

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 ->".
@dimitrieh

Copy link
Copy Markdown
Contributor Author

Nothing to change here, one note. /platform was never added to NUXT_PREFIXES in nuxt/server/middleware/legacy.ts, so npm run dev keeps proxying it to 11ty and serves the old page. That middleware returns early unless NODE_ENV === 'development', which is why CI and the deploy preview both look correct and this went unnoticed.

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.
@dimitrieh

Copy link
Copy Markdown
Contributor Author

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
@dimitrieh

Copy link
Copy Markdown
Contributor Author

Conflicts resolved, main is merged in. Same shape as the other migration PRs: the registry files take the union, so NUXT_PREFIXES and the prerender list keep both sides and this PR's own route drops out of the "still on 11ty" comment.

dimitrieh and others added 4 commits September 17, 2026 12:03
# 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
Comment thread nuxt/pages/platform/why-flowfuse.vue Outdated
Comment thread nuxt/pages/platform/why-flowfuse.vue
@dimitrieh

Copy link
Copy Markdown
Contributor Author

@Yndira-E @KristopherLeads PR conflicts are resolved.

…pe-to-production ima (#5848)

Co-authored-by: macroscopeapp[bot] <170038800+macroscopeapp[bot]@users.noreply.github.com>
Comment thread nuxt/pages/platform/why-flowfuse.vue Outdated
…io on why-flowfuse p (#5849)

Co-authored-by: macroscopeapp[bot] <170038800+macroscopeapp[bot]@users.noreply.github.com>
@ZJvandeWeg
ZJvandeWeg merged commit 4520fd4 into main Sep 24, 2026
9 checks passed
@ZJvandeWeg
ZJvandeWeg deleted the nuxt/platform branch September 24, 2026 14:16
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