-
Notifications
You must be signed in to change notification settings - Fork 77
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(list-item): Add content slot for specialized content #5876
Conversation
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.
Something is funky with the focus when using the content
slot. You can repro in the story after removing the disabled
attributes, or put this at the end of the list demo:
<!-- custom content -->
<div class="parent">
<style>
.list-chip {
margin-inline-end: 0.5rem;
}
</style>
<div class="child right-aligned-text">custom content</div>
<div class="child">
<calcite-list>
<calcite-list-item>
<div slot="content">
<strong>Cras iaculis ultricies nulla.</strong>
<div>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</div>
</div>
</calcite-list-item>
<calcite-list-item>
<div slot="content">
<strong>Cras iaculis ultricies nulla.</strong>
<div>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</div>
</div>
</calcite-list-item>
<calcite-list-item>
<div slot="content">
<strong>Cras iaculis ultricies nulla.</strong>
<div>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</div>
</div>
</calcite-list-item>
</calcite-list>
</div>
</div>
For the most part, I can't get the focus ring to show up when clicking or tabbing. However if you click/tab for long enough the focus ring will eventually show up on one of the items. I also noticed some inconsistent focus ring behavior for the "start/end content slots" demo, so it might not be completely related to this PR. But the content slot focus behavior seems a lot worse
@benelan can you create an issue for this one? I do see the problem. |
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.
Yeah I confirmed it's reproducible on our next
storybook deployment, so it isn't a result of the changes in this PR.
https://esri.github.io/calcite-components/?path=/story/components-list--start-and-end-content-slots
If you rather address it in a different PR I'm okay with that; I'll create an issue. Other than that and the doc nitpick, LGTM
Yeah, it would be easier to track and report that way 👍 |
Related Issue: #3032
Summary
feat(list-item): Add slot for specialized content #3032
content
slot to thelist-item
for customized content.content
slot takes precedence overlabel
anddescription
properties.