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

[Combobox] Improve placeholder display / add support for placeholder icon #4629

Closed
macandcheese opened this issue May 26, 2022 · 24 comments
Closed
Assignees
Labels
4 - verified Issues that have been released and confirmed resolved. enhancement Issues tied to a new feature or request. estimate - 2 Small fix or update, may require updates to tests.

Comments

@macandcheese
Copy link
Contributor

Description

The current implementation of the placeholder text leads to a weird space when there are icons present in the combobox items.

Current functionality:
Screen Shot 2021-10-27 at 12 19 12 PM
Screen Shot 2021-10-27 at 12 19 19 PM
Screen Shot 2021-10-27 at 12 19 27 PM

Acceptance Criteria

We should:

  • Accept a new placeholder-icon property to set a default icon.
  • If placeholder-icon is not provided, left-align the placeholder text to remove the awkward space.

Relevant Info

Breakout from #3074.

Which Component

Combobox

Example Use Case

There are often times when having a prompt icon adjacent to the placeholder text could be useful. If a placeholder icon is not desired, the current empty space between the edge of the input and the placeholder text is not desirable.

@macandcheese macandcheese 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 May 26, 2022
@MonikaKanduri4525
Copy link

I would need the icon placeholder for the VTSE product. I'm using Combobox for folders and tags search (this is part of a new screen in VTSE). Could you please prioritize this issue?

Screen Shot 2022-05-26 at 3 29 37 PM

@macandcheese
Copy link
Contributor Author

@benelan could we bump priority of this? Should be a reasonably easy add.

@benelan benelan removed the needs triage Planning workflow - pending design/dev review. label May 27, 2022
@benelan benelan added this to the Sprint 06/06 - 06/17 milestone May 27, 2022
@anveshmekala anveshmekala self-assigned this Jun 21, 2022
@MonikaKanduri4525
Copy link

Also, It's very confusing to clear the input, it's not a straightforward way. Can we add a "clear button" on input for single-mode?

Screen Shot 2022-06-21 at 10 52 34 AM

@macandcheese
Copy link
Contributor Author

Also, It's very confusing to clear the input, it's not a straightforward way. Can we add a "clear button" on input for single-mode?

Screen Shot 2022-06-21 at 10 52 34 AM

Yep, that is proposed as default here: #4738 (comment)

@anveshmekala anveshmekala added 2 - in development Issues that are actively being worked on. and removed 0 - new New issues that need assignment. labels Jun 21, 2022
@anveshmekala anveshmekala added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 2 - in development Issues that are actively being worked on. labels Jun 29, 2022
@github-actions github-actions bot assigned benelan and geospatialem and unassigned anveshmekala Jun 29, 2022
@github-actions
Copy link
Contributor

Installed and assigned for verification.

@benelan
Copy link
Member

benelan commented Jul 29, 2022

@macandcheese can you help verify that this is the intended spacing when there is no placeholder-icon?
image
https://codepen.io/benesri/pen/VwXrMwR

@macandcheese
Copy link
Contributor Author

Two pieces of feedback on that: It seems the example shown should use the same spacing as input :
Screen Shot 2022-07-28 at 5 54 38 PM

It seems like there is extra padding on the left - and you can see there is a cursor change at the left side that coincides with that extra space.

I would also imagine the alignment between the value / placeholder with icon, and the spacing of the combobox items (when not nested), would align:
Group 23

cc @ashetland for visibility.

@benelan
Copy link
Member

benelan commented Jul 29, 2022

Yeah I agree with that feedback. Assigning back to dev for some adjustments. Thanks Adam!

@benelan benelan added 1 - assigned Issues that are assigned to a sprint and a team member. and removed 3 - installed Issues that have been merged to master branch and are ready for final confirmation. labels Jul 29, 2022
@macandcheese
Copy link
Contributor Author

macandcheese commented Oct 4, 2022

Ideally the spacing is the same, in that example the bullet dot is visually misaligned. IMO it would make sense to push it out to match the item with icon. When there is an icon and item is selected, I do find it weird the dot isn’t present, even if it pushes the icon over, it could still be aligned to the gutter of icon / bullet. We could also the icon the color of the dot to make it easier to tell when it’s selected.

@geospatialem
Copy link
Member

Given the context of alignment to accommodate combobox with and without icons (info below)...

@jcfranco Should we proceed with closing and creating a new issue with this context or re-assigning this issue to the current or next sprint to tackle? Fairly low in prioritization, but seems pertinent for the 1.0.0 release.

Ideally the spacing is the same, in that example the bullet dot is visually misaligned. IMO it would make sense to push it out to match the item with icon. When there is an icon and item is selected, I do find it weird the dot isn’t present, even if it pushes the icon over, it could still be aligned to the gutter of icon / bullet. We could also the icon the color of the dot to make it easier to tell when it’s selected.

The recommended fix would include:

  • Spacing the selection indicator in alignment with the icon (when present)
  • Spacing the text in alignment regardless of icon presenc

@github-actions github-actions bot removed the Stale Issues or pull requests that have not had recent activity. label Oct 6, 2022
@geospatialem
Copy link
Member

Recirculating to a future sprint to meet the additional items in the comment above.

cc @jcfranco

@geospatialem geospatialem added 0 - new New issues that need assignment. and removed 3 - installed Issues that have been merged to master branch and are ready for final confirmation. labels Oct 13, 2022
@Elijbet Elijbet self-assigned this Dec 2, 2022
@Elijbet Elijbet added the estimate - 2 Small fix or update, may require updates to tests. label Dec 2, 2022
@anveshmekala anveshmekala self-assigned this Jan 12, 2023
@anveshmekala anveshmekala added 2 - in development Issues that are actively being worked on. and removed 0 - new New issues that need assignment. labels Jan 13, 2023
@anveshmekala
Copy link
Contributor

anveshmekala commented Jan 13, 2023

The recommended fix would include:

  • Spacing the selection indicator in alignment with the icon (when present)
  • Spacing the text in alignment regardless of icon present

Added fix for aligning selector indicator with the icon when present and text aligns regardless of icon. Do we need to add selector indicator for items with icons or would that be a separate discussion ?

cc @macandcheese

@macandcheese
Copy link
Contributor Author

I think I'd expect it to also have in indicator, like dropdown, but cc @ashetland @SkyeSeitz for final design.
Screen Shot 2023-01-12 at 4 57 50 PM

@SkyeSeitz
Copy link

I think I'd expect it to also have in indicator, like dropdown, but cc @ashetland @SkyeSeitz for final design. Screen Shot 2023-01-12 at 4 57 50 PM

Yup. 100% agree here.

@anveshmekala
Copy link
Contributor

I think I'd expect it to also have in indicator, like dropdown, but cc @ashetland @SkyeSeitz for final design. Screen Shot 2023-01-12 at 4 57 50 PM

Yup. 100% agree here.

Can i get a Figma design for this one as matching with dropdown is bit of an issue with difference in padding for dropdown-item compared to combobox-item .

@geospatialem geospatialem added 4 - verified Issues that have been released and confirmed resolved. and removed 2 - in development Issues that are actively being worked on. labels Jan 13, 2023
@geospatialem
Copy link
Member

The original issue has been addressed above in the following Codepen. A new issue, 6287 was created to address the component's indicator icon when children have accompanying icons.

placeholder image:

image

no placeholder image (left-align):

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - verified Issues that have been released and confirmed resolved. enhancement Issues tied to a new feature or request. estimate - 2 Small fix or update, may require updates to tests.
Projects
None yet
Development

No branches or pull requests

7 participants