-
Notifications
You must be signed in to change notification settings - Fork 13
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 prefix to UiListItem #469
feat: add prefix to UiListItem #469
Conversation
* refactor: improved performance of UiList * feat: style for AsCondition stories * feat: style for IconInHeading stories * fix: stories * fix: stories * chore: cleaning * fix: stories * chore: remove changes from UiListItemSuffixAsButton.vue * fix: ts errors * fix: warnings * fix: ts errors * fix: lint errors * refactor: long list stories improvement * fix: eslint errors * fix: indentation
1660c0e
to
8c846da
Compare
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.
Overall looks good 👍
Have you checked it locally with the MGP? Does it break the app or doesn't it?
…edica#471) * fix: font color for character counter
tested in MGP, it doesn't break app |
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.
Taking a quick look at ItemPrefix
and ItemSuffix
, aren't they pretty much identical? The only difference I could find is the reorder of icon & label. 🤔
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 thought about creating an affix component... but finally, I made 2 different components. Give me a minute. I will do that.
8b85a06
to
9ebc990
Compare
8527e85
to
e86f7b0
Compare
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 could be simplified even more. The Prefix
and Suffix
are still almost identical, with slight differences in the template. We could get rid of UiListItemPrefix
and UiListItemSuffix
and use the UiListItemAffix
straight away in the UiList, couldn't we? The only difference between those two is the elements' order: icon, label
vs. label, icon
Order and CSS Variables for both i.e --list-item-item-suffix-icon-color. We can't merge it to --ui-list-item-affix |
@AlanLes now duplicate parts are in the affix component. For Prefix just add template and CSS Variables for suffixes and prefixes. The suffix has @deprecated props. This way allows us to make changes in the template in the feature. |
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.
adjustment to changes in UiListItem styles
The merge-base changed after approval.
# Conflicts: # src/components/organisms/UiList/UiList.stories.ts # src/components/organisms/UiList/_internal/UiListItem.vue # src/components/organisms/UiList/_internal/UiListItemSuffix.vue # src/components/organisms/UiList/stories/Condition.vue # src/components/organisms/UiList/stories/IconInHeading.vue
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.
adjustment to changes in UiListItem styles
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.
adjustment to changes in UiListItem API
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 prefer to use "Component Composition" instead of handling templates (and more) in the UiListItemAffix component.
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.
OK, nothing more to add ;)
Description
This PR:
UiListItemAffix
component as the base forUiListItemPrefix
andUiListItemSuffix
UiListItemAffix
to createUiListItemPrefix
UiListItemSuffix
. UseUiListItemAffix
and handle@deprecated
propsicon
to keep transparent API for prefix and suffix componentRelated Issue
Closes #
Motivation and Context
One design of Default UiMenuItem has a prefix element. Same as the design for UiListItem "32 Icon List Item". To allow the use both designs I add the prefix to UiListItem
UiListItem
UiMenuItem
How Has This Been Tested?
Null
Screenshots (if appropriate):
Checklist: