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

[Bug]: Dropdown skeleton state missing label #15853

Closed
2 tasks done
shixiedesign opened this issue Mar 1, 2024 · 1 comment · Fixed by #15895
Closed
2 tasks done

[Bug]: Dropdown skeleton state missing label #15853

shixiedesign opened this issue Mar 1, 2024 · 1 comment · Fixed by #15895
Assignees

Comments

@shixiedesign
Copy link
Contributor

Package

@carbon/react, @carbon/styles, carbon-components, carbon-components-react

Browser

No response

Package version

Latest

React version

No response

Description

It appears that skeleton state of Dropdown component is missing the label. Only the field itself get skeleton-ized, and label went missing. This caused a small page jump when loading. Other common form inputs has the label in skeleton state already.

Also, because storybook doesn't contain the skeleton states of these components, I couldn't check what they are:

  • Multiselect
  • Combo box
  • Time picker
image

Reproduction/example

https://react.carbondesignsystem.com/?path=/story/components-dropdown--skeleton

Steps to reproduce

Click through for skeleton state story and look for label

Suggested Severity

None

Application/PAL

No response

Code of Conduct

@tay1orjones
Copy link
Member

tay1orjones commented Mar 4, 2024

skeleton state of Dropdown component is missing the label

Interestingly, the DOM node is there, it's just not getting the appropriate styles it seems.

<span className={`${prefix}--list-box__label`} />

I'm not sure why, but it's the same way in v10 as well. Also there is no hideLabel option. Maybe this was intentional at one point, but I think we should add the label in by default so there's no page jump when swapping out the skeleton for the real component, and also add the hideLabel option to toggle the rendering of the label or not for cases where a label isn't used on the real component.

Also, because storybook doesn't contain the skeleton states of these components, I couldn't check what they are:

  1. Multiselect
  2. Combo box
  3. Time picker

MultiSelect, FilterableMultiSelect, Combobox, and Dropdown are all part of the "Dropdown family", so the intent is for all of these components you would use the Dropdown skeleton. All the more reason why we should fix the label issue above.

Timepicker is a combination of TextInput and Select components. For a skeleton state experience you should be able to use the TextInputSkeleton without hideLabel next to 1-2 SelectSkeleton components with the hideLabel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants