-
Notifications
You must be signed in to change notification settings - Fork 91
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
feat: Add consistent variant
prop for design variant of buttons / chips
#6472
Open
susnux
wants to merge
6
commits into
master
Choose a base branch
from
feat/variant
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.
+309
−133
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
Antreesy
reviewed
Jan 30, 2025
Deprecate `type` for usage with the color variant. Also deprecate `nativeType` in favor of `type` and `variant`. Signed-off-by: Ferdinand Thiessen <[email protected]>
This is done to align with `NcButton`. Signed-off-by: Ferdinand Thiessen <[email protected]>
To align with `NcButton`. Signed-off-by: Ferdinand Thiessen <[email protected]>
…`type` prop To align with `NcButton`. Signed-off-by: Ferdinand Thiessen <[email protected]>
…e` prop To align with `NcButton`. Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
ShGKme
approved these changes
Mar 3, 2025
Comment on lines
+27
to
+20
<!-- Before: --> | ||
<NcButton type="primary" native-type="submit">Submit</NcButton> | ||
<!-- After: --> | ||
<NcButton type="submit" variant="primary">Submit</NcButton> |
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.
To keep semantics - only prop names were renamed
Suggested change
<!-- Before: --> | |
<NcButton type="primary" native-type="submit">Submit</NcButton> | |
<!-- After: --> | |
<NcButton type="submit" variant="primary">Submit</NcButton> | |
<!-- Before: --> | |
<NcButton type="primary" native-type="submit">Submit</NcButton> | |
<!-- After: --> | |
<NcButton variant="primary" type="submit">Submit</NcButton> |
st3iny
approved these changes
Mar 4, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
@nextcloud/vue v9
breaking changes #6384 (comment)☑️ Resolves
Currently we need to wrap the native
type
prop of a button intonativeType
ofNcButton
.This is confusing and we should never use names for props that are already attributes of the native HTML element.
The solution is to rename
type
tovariant
.To not make it breaking following is applied:
variant
prop is added replacingtype
nativeType
is deprecated in favor oftype
type
allows both, the native button type and the color variantnativeType
The same is also applied for
NcDialogButton
andNcActions
.NcChip
also referred to theNcButton
for thetype
so this is also migrated the same way to make the wordingvariant
consistent.In a last step all components are refactored to use the new props instead.
🖼️ Screenshots
Nothing visually changed - if it does that's a regression 😨
🏁 Checklist
next
requested with a Vue 3 upgrade