-
Notifications
You must be signed in to change notification settings - Fork 88
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
[next] feat(NcActions*): migrate to vue 3 #4646
Conversation
ef61873
to
63c07e3
Compare
Rebased. |
ffb7614
to
e117273
Compare
Resolved conflicts. |
Another review would be very welcome 🙂 |
Signed-off-by: Raimund Schlüßler <[email protected]>
e117273
to
aa7e88b
Compare
Rebased and resolved conflicts. |
before() { | ||
// all actions requires a valid text content | ||
// if none, forbid the component mount and throw error | ||
if (!this.$slots.default || this.text.trim() === '') { | ||
Vue.util.warn(`${this.$options.name} cannot be empty and requires a meaningful text content`, this) | ||
if (!this.$slots.default() || this.text.trim() === '') { | ||
warn(`${this.$options.name} cannot be empty and requires a meaningful text content`, this) |
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.
How does this part work? o_O
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 exactly do you mean? I didn't write it, originally, I only adjusted it for vue 3.
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.
Sorry, I missed that it was an old part. I just don't understand how it works in general, who and where call this before()
custom option.
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, I also find it a bit weird. Every Action*
component, e.g. ActionButton
uses this mixin to check that either text
or the default slot are present.
Signed-off-by: Raimund Schlüßler <[email protected]>
Signed-off-by: Raimund Schlüßler <[email protected]>
Signed-off-by: Raimund Schlüßler <[email protected]>
Signed-off-by: Raimund Schlüßler <[email protected]>
Signed-off-by: Raimund Schlüßler <[email protected]>
Signed-off-by: Raimund Schlüßler <[email protected]>
@ShGKme Could you review again, please? I hope I fixed everything. |
@nextcloud-libraries/developers Honestly, it is a bit demotivating that very few seem to care that the components finally support vue 3. And at the risk of repeating myself: vue 2 reaches EOL in 45 business days. After that, it won't receive any more updates. Even if the risk for security issues in vue 2 is likely really low, it doesn't seem to be the best approach to not give developers at least the option to use supported libraries (especially for a project that always emphasizes to run up-to-date software). |
☑️ Resolves
This migrates the
NcActions
component to vue 3.