Skip to content

feat: add new Nuxt module for guidance banner#2424

Open
Maciej D (mdanilowicz) wants to merge 12 commits intomainfrom
feat/GH-2405
Open

feat: add new Nuxt module for guidance banner#2424
Maciej D (mdanilowicz) wants to merge 12 commits intomainfrom
feat/GH-2405

Conversation

@mdanilowicz
Copy link
Copy Markdown
Contributor

@mdanilowicz Maciej D (mdanilowicz) commented May 1, 2026

Screenshot 2026-05-06 at 10 11 33

closes #2405

The module works only on the client and only during local development. When the app starts, it mounts a banner at the bottom of the page, outside the main app tree. The banner includes quick links, can be dismissed by the user, and remembers that choice in localStorage so it does not reappear on the next refresh. It also adjusts the page bottom spacing dynamically to avoid covering the content.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
frontends-starter-template-extended Ready Ready Preview, Comment May 8, 2026 11:11am
frontends-vue-starter-template Building Building Preview, Comment May 8, 2026 11:11am
old-frontends-demo Building Building Preview, Comment May 8, 2026 11:11am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
shopware-frontends-docs Skipped Skipped Comment May 8, 2026 11:11am

Request Review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new Nuxt module package intended to show a dev-only “project ready” guidance banner by mounting a client-side Vue app outside the main Nuxt tree, with dismissal persisted in localStorage.

Changes:

  • Introduces @shopware/guidance-banner Nuxt module scaffolding and client plugin to mount the banner.
  • Adds the ShopwareBanner component UI and body-padding sync logic to avoid covering page content.
  • Prepares the vue starter template to consume the module (currently commented out).

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
templates/vue-starter-template/nuxt.config.ts Adds (commented) module entry intended to enable the banner in the template.
packages/shopware-guidance-banner/tsconfig.json Adds TS config for the new module package.
packages/shopware-guidance-banner/src/runtime/plugin.client.ts Client plugin that creates a detached Vue app and mounts the banner container to document.body.
packages/shopware-guidance-banner/src/runtime/components/ShopwareBanner.vue Banner UI, dismissal persistence, and dynamic body padding behavior.
packages/shopware-guidance-banner/src/module.ts Nuxt module definition that only registers the plugin in dev mode.
packages/shopware-guidance-banner/package.json New package manifest, scripts, exports, and dependencies for publishing.
packages/shopware-guidance-banner/eslint.config.mjs ESLint flat config for the new package.
packages/shopware-guidance-banner/.npmrc Adds npm configuration for the package.
packages/shopware-guidance-banner/.gitignore Adds ignore rules for generated/build artifacts in the new package.
packages/shopware-guidance-banner/.editorconfig Adds editor formatting rules for the new package.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread templates/vue-starter-template/nuxt.config.ts
Comment thread packages/shopware-guidance-banner/src/runtime/components/ShopwareBanner.vue Outdated
Comment thread packages/shopware-guidance-banner/eslint.config.mjs Outdated
Comment thread packages/shopware-guidance-banner/package.json
Comment thread packages/shopware-guidance-banner/package.json Outdated
Comment thread packages/shopware-guidance-banner/package.json Outdated
Comment thread packages/shopware-guidance-banner/tsconfig.json
Comment thread packages/shopware-guidance-banner/.npmrc Outdated
},
{
label: 'Docs',
href: 'https://frontends.shopware.com/',
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.

or is it https://developer.shopware.com/frontends/

Copy link
Copy Markdown
Contributor

@patzick Patryk Tomczyk (patzick) left a comment

Choose a reason for hiding this comment

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

I strongly believe that whole package is an overkill for it. Would be much simpler to just puit that in the template and people see that on first run and can just delete plugin/component and be done with it. Having that as separate npm package doesn't look like benefit

@@ -0,0 +1,12 @@
root = true
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.

we should not have dedicaated editorconfig file for this package

@@ -0,0 +1,56 @@
# Dependencies
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.

this also is probably too broad

@@ -0,0 +1,15 @@
// @ts-check
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.

for new package let's use oxlint right from the beginning, we'll migrate either way at some point so better now with new package

@@ -0,0 +1,53 @@
{
"name": "@shopware/guidance-banner",
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.

I'd suggest something like @shopware/nuxt-guidance-banner as it's nuxt-specific, also directory change from shopware-guidance-banner to guidance-banner

"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxt prepare playground",
"lint": "eslint src --ext .ts,.vue",
"lint:fix": "eslint src --ext .ts,.vue --fix",
"release": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags"
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.

we definetly do not release like this

"@nuxt/schema": "4.4.2",
"@nuxt/test-utils": "4.0.2",
"@types/node": "22.13.14",
"changelogen": "0.6.2",
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.

review dependencies, probably many not needed like this one

"exports": {
".": {
"types": "./dist/types.d.mts",
"import": "./dist/module.mjs"
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.

do we need build step for nuxt module? Maybe just shipping raw TS would be enough?

const links = [
{
label: 'View code',
href: 'https://github.com/shopware/frontends/tree/main/templates/vue-starter-template',
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.

is that package only for this template?

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.

[Frontends] Post-ready guidance banner inside sandbox

5 participants