-
-
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
4d9c14d
chore: issue reproduction
farnabaz 7041f6a
fix: freeze current page
danielroe 166d93e
chore: change layouts
farnabaz 8b09a24
chore: make bug painfully obvious
danielroe 6a40315
fix: embed layout in page
danielroe 3756770
fix: overwrite default `app.vue`
farnabaz 7f02394
chore: update playground
farnabaz 522fcdd
chore: cleanup deps
farnabaz adac73a
chore: warn about NuxtLayout
farnabaz a4bd1a3
chore: update vue-file.vue to use NuxtLayout component
atinux e63306c
fix: handle HMR in DD page
farnabaz c019001
chore: update playground
atinux 477acef
Merge branch 'main' into fix/dd-layout-shift
atinux 06ab94e
feat(cache): add local caching on page/surround queries in dd mode
Tahul File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<template> | ||
<div> | ||
<NuxtLoadingBar /> | ||
<NuxtPage /> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<template> | ||
<div> | ||
<div style="display: flex; align-items: center"> | ||
<div style="font-size: 64px;"> | ||
β | ||
</div> | ||
<div> | ||
<h3 style="margin: 0"> | ||
<Markdown :use="$slots.title" unwrap="p" /> | ||
</h3> | ||
<div> | ||
<Markdown :use="$slots.default" unwrap="p" /> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<script setup lang="ts"> | ||
// Utils from Nuxt Content | ||
const { flatUnwrap } = useUnwrap() | ||
</script> | ||
|
||
<template> | ||
<ul> | ||
<li v-for="(item, index) of flatUnwrap($slots.default(), ['ul'])" :key="index"> | ||
βοΈ | ||
<span><Markdown :use="() => item" unwrap="li" /></span> | ||
</li> | ||
</ul> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
layout: blog | ||
--- | ||
|
||
::alert{icon="ph:circle-wavy-warning-duotone"} | ||
#title | ||
This is an alert | ||
#default | ||
This is the default content of my alert! | ||
:: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
::list | ||
- Item 1 | ||
::list{icon="ph:check-circle-light"} | ||
- Item 1.1 | ||
- Item 1.2 | ||
:: | ||
- Item 2 | ||
:: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
<template> | ||
<div> | ||
<NuxtLoadingBar /> | ||
|
||
<NuxtPage /> | ||
|
||
<slot /> | ||
<PageNav /> | ||
</div> | ||
</template> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
<script setup> | ||
definePageMeta({ | ||
layout: 'reversed' | ||
documentDriven: { | ||
surround: false | ||
} | ||
}) | ||
const { page } = useContent() | ||
useContentHead(page) | ||
</script> | ||
|
||
<template> | ||
<ContentRenderer :value="page" /> | ||
<NuxtLayout name="reversed"> | ||
<ContentRenderer :value="page" /> | ||
</NuxtLayout> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<template> | ||
<div style="max-width: 680px; margin: 0 auto"> | ||
<NuxtLoadingBar /> | ||
|
||
<PageNav /> | ||
|
||
<slot /> | ||
</div> | ||
</template> | ||
|
||
<style> | ||
body, html { | ||
margin: 0; | ||
padding: 0; | ||
min-height: 100vh; | ||
min-width: 100vw; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
<template> | ||
<div> | ||
<NuxtLoadingBar /> | ||
|
||
<PageNav /> | ||
|
||
<NuxtPage /> | ||
<slot /> | ||
</div> | ||
</template> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<template> | ||
<NuxtPage /> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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?