Skip to content
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

Closed
13 tasks
benelan opened this issue Aug 23, 2021 · 9 comments
Closed
13 tasks
Assignees
Labels
1 - assigned Issues that are assigned to a sprint and a team member. Calcite (dev) Issues logged by Calcite developers. enhancement Issues tied to a new feature or request. epic Large scale issues to be broken up into sub-issues and tracked via sprints and/or project. estimate - 8 Requires input from team, consider smaller steps. need more info Issues that are missing information and/or a clear, actionable description. p - low Issue is non core or affecting less that 10% of people using the library resolution: refine For issues we support, but additional details are needed prior to dev work.

Comments

@benelan
Copy link
Member

benelan commented Aug 23, 2021

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

 <calcite-button>Button
     <calcite-icon icon="share" slot="content-start"/>
</calcite-button>

Instead of In addition to the current method

 <calcite-button icon-start="share">Button</calcite-button>

Related issues

@benelan benelan added enhancement Issues tied to a new feature or request. 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. labels Aug 23, 2021
@macandcheese
Copy link
Contributor

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.

@benelan
Copy link
Member Author

benelan commented Aug 23, 2021

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.

@julio8a julio8a added epic Large scale issues to be broken up into sub-issues and tracked via sprints and/or project. and removed needs triage Planning workflow - pending design/dev review. enhancement Issues tied to a new feature or request. labels Sep 24, 2021
@benelan benelan added needs triage Planning workflow - pending design/dev review. and removed needs triage Planning workflow - pending design/dev review. labels Sep 27, 2021
@geospatialem geospatialem added 1 - assigned Issues that are assigned to a sprint and a team member. and removed 0 - new New issues that need assignment. labels Jul 19, 2022
@geospatialem geospatialem added this to the 2023 January Priorities milestone Nov 23, 2022
@benelan benelan added the Calcite (dev) Issues logged by Calcite developers. label Jan 30, 2023
@rweber-esri
Copy link

Hub has similar needs for calcite-accordion-item where we'd like to:

  • customize the content passed into current heading and description props so line-clamp styles can be applied
  • tooltips for icons rendered via icon-start & icon-end.

Adding additional slots to those regions of the component would help us to achieve above.

@jcfranco
Copy link
Member

jcfranco commented Mar 4, 2023

@rweber-esri Thanks for sharing your use case.

  • customize the content passed into current heading and description props so line-clamp styles can be applied

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.

  • tooltips for icons rendered via icon-start & icon-end

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.

@macandcheese
Copy link
Contributor

macandcheese commented Mar 4, 2023

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.

@geospatialem geospatialem added p - low Issue is non core or affecting less that 10% of people using the library estimate - 8 Requires input from team, consider smaller steps. labels Apr 4, 2023
@geospatialem geospatialem added the need more info Issues that are missing information and/or a clear, actionable description. label Jul 3, 2023
@geospatialem
Copy link
Member

geospatialem commented Jul 3, 2023

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.

@jcfranco jcfranco self-assigned this Jul 3, 2023
@jcfranco
Copy link
Member

jcfranco commented Jul 3, 2023

+@brittneytewks

@geospatialem geospatialem added the resolution: refine For issues we support, but additional details are needed prior to dev work. label Jul 24, 2023
@macandcheese
Copy link
Contributor

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

@geospatialem
Copy link
Member

geospatialem commented Sep 18, 2023

Closing per the above conversation.

Some issues have been mitigated, which include: #3032, #3127 and #6561.

Additional issues have been opened and can be tracked independently, which include: #968, #3608, #6565, and #6567.

New issues can be added on a per component basis as they come up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - assigned Issues that are assigned to a sprint and a team member. Calcite (dev) Issues logged by Calcite developers. enhancement Issues tied to a new feature or request. epic Large scale issues to be broken up into sub-issues and tracked via sprints and/or project. estimate - 8 Requires input from team, consider smaller steps. need more info Issues that are missing information and/or a clear, actionable description. p - low Issue is non core or affecting less that 10% of people using the library resolution: refine For issues we support, but additional details are needed prior to dev work.
Projects
None yet
Development

No branches or pull requests

10 participants