-
-
Notifications
You must be signed in to change notification settings - Fork 627
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(document-driven): rendering flash #1336
Conversation
Nuxt preview for Nuxt Content Docs: http://localhost:3000?_preview=b0f45de989d663ee5dcca6932fcb84477b10f8136152757fad1bc6b79e17f209 |
Nuxt preview for Nuxt Content Playground: http://localhost:3000?_preview=841e245f9cde6a9a0e5729fe3235852d6b369eae78076ca4d392b8e5af0baeb5 |
✅ Deploy Preview for nuxt-content ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
nuxt.hook('app:resolve', (app) => { | ||
if (app.mainComponent?.includes('@nuxt/ui-templates')) { | ||
app.mainComponent = resolveRuntimeModule('./app.vue') | ||
} |
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.
What do you think of reading the mainComponent when we cannot overwrite it, check if it includes (<NuxtLayout
) and warn the user to use <NuxtLayout>
in the page to avoid layout shift with the document driven mode?
Seems we have an issue with HMR when changing the Screenshot.2022-07-06.at.14.03.28.mp4 |
Also seems that the layout is not applied for EDIT: updated to use |
Added watch in DD page to handle HMR e63306c |
Before merging this could we please link this PR to the issue upstream related to that rendering issue? Also could we leave TODO's in code pointing to this PR or the tracked issue. Just want to be sure this is not considered as long term workaround but more as an hot fix we consider acceptable for a minor release, that will transparently be replaced by the long term solution when the upstream issue gets resolved. |
Agree, using |
The issue is, when this resolved in upstream, it will be breaking change for users that have custom |
Here is a (incomplete) list of issues to track that will most likely improve the situation:
These issues have kindly been forwarded by @danielroe, thanks a lot for this! These are not directly causing this issue looks more like a combination of factors that could have impact on what is wrong for us. Considering this PR, I think we can move forward with it and prepare the migration notes for users when they will have to rollback the workarounds we are forced to use to (partially) fix this rendering flash. |
Co-authored-by: Daniel Roe <[email protected]> Co-authored-by: Sébastien Chopin <[email protected]> Co-authored-by: Yaël Guilloux <[email protected]>
🔗 Linked issue
❓ Type of change
📚 Description
📝 Checklist