-
-
Notifications
You must be signed in to change notification settings - Fork 547
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
[6.x] Vue 3 #11339
Draft
jasonvarga
wants to merge
140
commits into
master
Choose a base branch
from
vue-3-upgrade
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
[6.x] Vue 3 #11339
+5,695
−5,055
Conversation
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
Includes all the dependencies that were already figured out from the other branch.
This is as-is, with import paths updated.
This doesn't actually make it work yet. This code was taken from other branch.
The old way was triggering a warning which is resolved by using shallowRef. This is mostly changing some syntax and moving things around. No logic change.
- Use modelValue prop and update:model-value event so v-model works - Add emits because you have to now - Render function returns first element otherwise this.$el would be a text node. - Swap $on hook:destroyed for the vue 3 way
- Import Fieldtype everywhere rather than relying on it being on window. (Will figure out the best solution for addons later) - Bring back registration of fieldtypes - Bard fieldtypes are commented out since they are quite broken at the moment. - Remove StatusFieldtype as its not used anymore.
…ypes are ... For a little bit of consistency.
- Open/close state wasn't being saved. Had to do it differently due to the draggable tree package being updated. Now IDs gets stored on an array and a watcher saves it to local storage. - IDs are now saved to local storage (for now?) purely because I couldn't figure out how to do paths in a timely manner. - Fixed removing a page not doing anything (in pageRemoved)
… to traverse upwards
Scrapped the polyfill, it's so widely supported. Scrapped the underscore mixins, we don't use them. Scrapped file_icon and resource_url, we don't use them.
Now users can do import { Fieldtype } from '../../vendor/statamic/cms/resources/js/exports.js' export default { mixins: [Fieldtype] } OR If they add resolve.alias.statamic to their vite.config.js they can simplify it further: resolve: { alias: { statamic: path.resolve(__dirname, './vendor/statamic/cms/resources/js/exports.js'), }, } import { Fieldtype } from 'statamic';
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This upgrades Vue 2 to Vue 3.
This takes over from the awesome progress of #10430.