-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: add support for SSR in DeviceHelperPlugin #249
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a changelog
@@ -20,6 +20,8 @@ | |||
</p> | |||
|
|||
<SwTextField label="A text field" v-model="text" /> | |||
|
|||
<MtTabs :items="[{ label: 'Foo' }, { label: 'Bar' }]" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though this is enough to test that the DeviceHelper is SSR compatible, I suggest to make this component do something like switching between content. This way we can be sure that switching views also works when using SSR. Additionally it creates a nicer demo page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, a full integration test would be needed here. But. We did end up with a few composables which I would like to introduce in separate PRs, maybe even a separate package (@shopware-ag/meteor-nuxt
):
useMeteorTabs
- framework-agnostic, might as well end up in@shopware-ag/meteor-component-library
useMeteorToast
,useMeteorModal
(depends on Nuxt'suseState
)useMeteorForm
- provides a layer betweenjoi
(and compatible) and shopware/meteor validation format, along with a few nuxt-based form components based on meteor componentsuseColorMode
- composable for managing system/light/dark modes based on meteor dark theme implementation (html attr).
Therefore, I would like to keep those PRs small and update the implementation (for example in the mt-toast.stories.ts
and nuxt-app
demo) along the way.
08859db
to
3148cc5
Compare
What?
This PR updates nuxt-app example with
MtTabs
component which is usingDeviceHelper
plugin + it activates SSR.Why?
To allow server-side rendering when
DeviceHelper
is used.How?
By checking for the
window
variable.Testing?
Locally, with provided nuxt-app example.
Screenshots (optional)
Anything Else?