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

Include slot for inline 'info icon' before or after label text. #4155

Closed
3 tasks
Tracked by #5529
mitc7862 opened this issue Feb 22, 2022 · 8 comments
Closed
3 tasks
Tracked by #5529

Include slot for inline 'info icon' before or after label text. #4155

mitc7862 opened this issue Feb 22, 2022 · 8 comments
Assignees
Labels
1 - assigned Issues that are assigned to a sprint and a team member. design Issues that need design consultation prior to development. enhancement Issues tied to a new feature or request. has workaround Issues have a workaround available in the meantime. p - high Issue should be addressed in the current milestone, impacts component or core functionality refactor Issues tied to code that needs to be significantly reworked.

Comments

@mitc7862
Copy link

Description

For analysis, we will need to provide parameter-based help for various inputs in the form. We'd like to include an inline action that triggers a popover with the helpful information in it.

Acceptance Criteria

  • There is a way for developers to include an icon in the label
  • You can include the icon before or after the label text
  • The icon can be used to trigger a popover

Relevant Info

No response

Which Component

Label

Example Use Case

image

@mitc7862 mitc7862 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 Feb 22, 2022
@macandcheese
Copy link
Contributor

macandcheese commented Feb 22, 2022

Thanks for submitting, this is a common use case ... could you add designs for the other layouts of input - inline and inline-space-between?

Additionally, the label text (or multiple strings) and child control can be placed in any order, so comps that show some less common arrangements could help us understand where to position the named slot.

I anticipate this will be very commonly used and because of the often tight confines of where it will be used we may want to be somewhat strict in our styling ruleset of the slot. To complicate things for ya @mitc7862 - the design should probably encapsulate some of what was proposed here #2793 - These two elements will likely co-exist at times.

…as a note, you can already do this, you just need to wrap these elements in a div and position as needed.

@jcfranco jcfranco added design Issues that need design consultation prior to development. has workaround Issues have a workaround available in the meantime. labels Feb 25, 2022
@jcfranco jcfranco added this to the Freezer milestone Feb 25, 2022
@jcfranco jcfranco removed the needs triage Planning workflow - pending design/dev review. label Feb 25, 2022
@TheBlueDog
Copy link

TheBlueDog commented Mar 8, 2022

Field Maps has many places where we need this and are currently having to build custom input labels to handle it

Screen Shot 2022-03-08 at 10 08 40 AM

@macandcheese
Copy link
Contributor

macandcheese commented Mar 8, 2022

When you say build custom input labels, do you mean just slot the div inside a calcite-label like this?

https://jsbin.com/zexapenizo/1/edit?html,output

I think the issue with potentially styling or placing a named slot is that, like in Mitch's example, there are many potentially valid placements for the tooltip-launching-icon.

@TheBlueDog
Copy link

We could certainly start with one as an opinionated pattern that we all use.

@TheBlueDog
Copy link

Is there any status on this? Field Maps is having to handle this currently with custom inputs.

@macandcheese
Copy link
Contributor

No update at this time. As an implementation note for when this is looked at - the label functionality to focus the child control may need to have an "exclusionary click zone" or something along those lines to ensure clicking on a, tooltip trigger, for example, doesn't focus the control.

@geospatialem geospatialem removed the 0 - new New issues that need assignment. label Nov 7, 2022
@geospatialem geospatialem added the 1 - assigned Issues that are assigned to a sprint and a team member. label Nov 7, 2022
@geospatialem geospatialem added refactor Issues tied to code that needs to be significantly reworked. 0 - new New issues that need assignment. and removed 1 - assigned Issues that are assigned to a sprint and a team member. labels Dec 2, 2022
@geospatialem
Copy link
Member

Adding the slot will require a major refactor, and will be prioritized after next month's release. cc: @ashetland, @Elijbet

Once prioritized the effort should be coupled with #2793 and #5079.

@geospatialem geospatialem added the needs triage Planning workflow - pending design/dev review. label Dec 2, 2022
@geospatialem geospatialem added p - high Issue should be addressed in the current milestone, impacts component or core functionality and removed needs triage Planning workflow - pending design/dev review. labels Mar 3, 2023
@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 Mar 3, 2023
@ashetland
Copy link
Contributor

Closing in favor of #5079.

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. design Issues that need design consultation prior to development. enhancement Issues tied to a new feature or request. has workaround Issues have a workaround available in the meantime. p - high Issue should be addressed in the current milestone, impacts component or core functionality refactor Issues tied to code that needs to be significantly reworked.
Projects
None yet
Development

No branches or pull requests

8 participants