This repository has been archived by the owner on Apr 6, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1k
feat(nuxt): config options for default keepalive, page & layout transitions #5859
Merged
Merged
Changes from 15 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
09e50a4
feat(nuxt): config default keepalive, page & layout transitions
danielroe fe376f5
fix: move head defaults to schema
danielroe 6a8b0cf
Merge branch 'main' into feat/transition-config
pi0 33912d4
fix merge issue
pi0 e710fab
Merge remote-tracking branch 'origin/main' into feat/transition-config
danielroe 98f6e99
Merge remote-tracking branch 'origin/main' into feat/transition-config
danielroe a947732
refactor: use new app config feature for accessing `app` options
danielroe 2e7265b
fix: remove unused import
danielroe 0e1fd96
fix: ignore types for appConfig.nuxt
danielroe e6d14d7
feat: type appconfig.nuxt from schema
danielroe 545f865
Merge branch 'main' into feat/transition-config
atinux 4f46021
refactor: move types from app schema -> internal `NuxtAppConfig` inteβ¦
danielroe 5a2ddf8
style: remove blank line
danielroe 9e3635d
fix: revert changes
danielroe b3bd9f7
refactor: rename to _nuxt
danielroe 670b949
test: update fixture
danielroe 3a47df8
fix: π
danielroe 7e64869
refactor: use `nuxt.config.mjs` to serialize nuxt app options
danielroe 01702ac
Merge branch 'main' into feat/transition-config
danielroe a414fcd
test: update config
danielroe 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
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
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
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.
For this, we could have a bundler flag (like
NUXT_PAGE_TRANSITION
) that replaces value tofalse
on build time otherwise setting app config tofalse
won't be able to tree-shake... (but can be later. pointing to make clear about false handling with this PR)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.
Yes. This PR does not enable tree-shaking out; it just sets default behaviour. We can't tree shake this way as user may wish to enable transitions/keepalive on a per-page basis.
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.
I would love to be able to tree-shake out the Transition/Keepalive components but will it would need a different approach than this PR.
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.
That's true. We use appConfig currently only to specify default but could be also used to specify feature flags. (swapping condition order when value is false to always disable transitions which I think would make more sense for false handling)
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.
Maybe support an additional option, e.g.
keepalive: 'disabled'
as the user may simply wish to disable them by default but not for all routes?