Uh oh!
There was an error while loading. Please reload this page.
fix(document-driven): rendering flash - #1336
Conversation
ghost
commented
Jul 6, 2022
Nuxt preview for Nuxt Content Docs: http://localhost:3000?_preview=b0f45de989d663ee5dcca6932fcb84477b10f8136152757fad1bc6b79e17f209 |
ghost
commented
Jul 6, 2022
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.
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?
atinux
commented
Jul 6, 2022
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 |
farnabaz
commented
Jul 6, 2022
Added watch in DD page to handle HMR e63306c |
Tahul
commented
Jul 6, 2022
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. |
atinux
commented
Jul 6, 2022
Agree, using |
The issue is, when this resolved in upstream, it will be breaking change for users that have custom |
Tahul
commented
Jul 7, 2022
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 <daniel@roe.dev> Co-authored-by: Sébastien Chopin <seb@nuxtjs.com> Co-authored-by: Yaël Guilloux <yael.guilloux@gmail.com>
🔗 Linked issue
❓ Type of change
📚 Description
📝 Checklist