-
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
Enhancement: Add slots to components that have props for external content #2884
Comments
Can we clarify the icon props suggestion? I was under the impression those would remain. It seems like an inconvenience and an invitation for design fragmentation to remove them on something like a button. |
My understanding is that the prop would stay and then some would be deprecated on a case by case basis. I was just tasked with documenting the proposal by @asangma so I'll wait for him to clarify. |
Hub has similar needs for
Adding additional slots to those regions of the component would help us to achieve above. |
@rweber-esri Thanks for sharing your use case.
We had toyed with the idea about making the header & description into separate helper components that could potentially be used for this, but haven't discussed since. @geospatialem I think this could be another task for this epic.
Are the item icons being used as actions? If so, I'd suggest using the accordion-item's start/end action slots instead (see codepen). Sidebar, those slots don't seem to be documented. I'll create a doc issue for this. |
Is this still relevant @asangma @benelan? It seems like many of the listed items already have had slots added (alert, notice, tree item, accordion item) since this was opened. In other cases, I’m not sure I agree with the suggestions in the wiki - do we need to add extra slots to simple components like button, chip, etc. that already offer a default slot? If someone really wants to put an image inside a button and style it differently than our provided icon props, they can use the default slot. The “action icon that invokes tooltip” slot use case @rweber-esri mentions totally makes sense in accordion item, tree item, notice. However where we accept icon properties they are generally supportive icons that themselves should be described by accompanying text and shouldn’t need a slot for a tooltip. |
Need to update the description of the ask above based on the current consistency patterns across the design system. This may no longer be needed after evaluation is determined. |
Can this be closed? The existing open issues should be sufficient for cases we've decided we want to support. Others, like Buttons, Avatar, etc., I don't believe are valid. We've also talked about increasing the functionality of the built-in icon props to support external assets, which would further cover our bases there. cc @jcfranco @geospatialem |
Description
Proposed by @asangma on Teams and summarized in this wiki page.
Acceptance Criteria
Add slots to the components (listed below) with props that handle external content. The most common scenario is icons.
Which Components
Example Use Case
Instead ofIn addition to the current methodRelated issues
heading
anddescription
#6567The text was updated successfully, but these errors were encountered: