-
Notifications
You must be signed in to change notification settings - Fork 268
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(xo-core): update TabItem
and TabList
components to v2
#8047
base: master
Are you sure you want to change the base?
Conversation
e413add
to
b30d16d
Compare
selected?: boolean | ||
tag?: string | ||
}>(), | ||
{ tag: 'span', disabled: undefined } |
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 is the point of assigning undefined
as the default value?
Is it to prevent vue
from converting undefined
to false
?
If so, is there any point in having undefined
instead of false
here?
Or maybe this is something I missed in the guideline?
In that case, why selected
is not handled?
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, it is to prevent undefined
to false
conversion by Vue. In this case it is necessary because the disabled
prop is used with useContext()
on line 30. selected
is not used in the context, so there is no need to do the same.
More information here
defineProps<{ | ||
disabled?: boolean | ||
selected?: boolean | ||
tag?: string | ||
}>(), |
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.
In the DS, i can see a counter
prop.
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 think it is for ease of use in Figma, in the Vue component, we have a slot, so we can pass any component if we need to.
@@ -1,6 +1,6 @@ | |||
<!-- v1.0 --> | |||
<!-- v2 --> |
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.
Based on the Tabs bar changelog
, the v2
implement the scroll bar 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.
In the Vue component, the scrollbar is automatically visible when there is not enough space. I'm not sure if we should have a prop to always enable it.
@@ -22,7 +22,7 @@ export function useTabList<TName extends string>(names: TName[], initialTab?: Ma | |||
event.preventDefault() | |||
activate(name) | |||
}, | |||
active: isActive(name), | |||
selected: isActive(name), |
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.
selected
: isSelected(name)
maybe? In order to sync name. (or isCurrent()
if the proposition is accepted)
b30d16d
to
1693636
Compare
@MathieuRA @ByScripts Also, I didn’t bump the I tried to fix this by changing the |
Description
Checklist
Fixes #007
,See xoa-support#42
,See https://...
)Introduced by
CHANGELOG.unreleased.md
Review process
Notes: