-
Notifications
You must be signed in to change notification settings - Fork 825
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
[2.x] Change Inertia Stubs to Composition API #1001
[2.x] Change Inertia Stubs to Composition API #1001
Conversation
I think it's a good idea but we would want to do the whole thing at once instead of just one page. Breeze is already using Composition API with In Breeze I believe we also moved the script section above template. |
Will do that, and check breeze code to match the same style. Thanks |
51c9610
to
e8d2720
Compare
Should be ready. |
@xiCO2k One small bug I have noticed so far is if you attempt to enable two factor authentication (or any other action which requires password confirmation), the password confirmation modal's password input does not receive focus automatically anymore - so you have to manually click on it. |
@xiCO2k there are also some merge conflicts because we recently added confirmation support to the 2FA screen. |
got it will take a look on it |
Marking as draft for now - just mark as ready when you want me to take a look again. |
Ok should be good. |
@xiCO2k did you use any specific formatter / prettier plugin to format the Vue files in terms of how HTML attributes like |
@taylorotwell used this module.exports = {
extends: [
'eslint:recommended',
'plugin:vue/vue3-recommended',
],
ignorePatterns: ['node_modules/**/*', 'vendor/**/*', 'public/**/*'],
parserOptions: {
ecmaVersion: 12,
sourceType: 'module',
},
plugins: [
'vue',
],
env: {
browser: true,
es2021: true,
node: true,
},
rules: {
indent: ['error', 4],
quotes: ['warn', 'single'],
semi: ['warn'],
'no-unused-vars': ['error', { vars: 'all', args: 'after-used', ignoreRestSiblings: true }],
'comma-dangle': ['warn', 'always-multiline'],
'vue/html-indent': ['error', 4],
'vue/multi-word-component-names': ['off'],
'vue/require-default-prop': ['off'],
'vue/max-attributes-per-line': ['error', {
singleline: { max: 3 },
}],
},
globals: {
route: 'readonly',
axios: 'readonly',
defineProps: 'readonly',
defineEmits: 'readonly',
},
}; |
If I click "Enable" on two factor authentication it still doesn't seem to focus on the password box: |
sorry fixed on other area. |
should be good. |
const codeInput = ref(null); | ||
|
||
const toggleRecovery = async () => { | ||
recovery.value ^= true; |
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.
@xiCO2k What is ^=
?
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 also did not know that one (was there before) but looks like it works like a toggle, if the value is 1 the ^= changes to 0 and if is 0 it changes to 1.
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.
Gotcha
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.
It's a bitwise XOR assignment operator, works in PHP as well.
This PR introduces the Composition API to the stubs of Inertia.
I will be using Jetstream with Inertia for a small project and I will be upgrading the inertia stubs to Composition API on my own project, so I will be able to PR all the changes from options API to composition API.
Do you guys think it will be a good option to have by default?
Thanks.