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

Add option to hide CircularOptionPicker when empty #61713

Closed
madhusudhand opened this issue May 16, 2024 · 2 comments · Fixed by #63961
Closed

Add option to hide CircularOptionPicker when empty #61713

madhusudhand opened this issue May 16, 2024 · 2 comments · Fixed by #63961
Assignees
Labels
[Package] Components /packages/components [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@madhusudhand
Copy link
Contributor

What problem does this address?

ColorPicker component leaves an empty html element even when there are no options defined.

usage

<ColorPalette
    clearable={ false }
    enableAlpha={ enableAlpha }
    value={ color }
    onChange={ ( value ) => {} }
/>
image

What is your proposed solution?

Remove the elements from the DOM.

@madhusudhand madhusudhand added [Type] Enhancement A suggestion for improvement. [Feature] UI Components Impacts or related to the UI component system labels May 16, 2024
@mirka
Copy link
Member

mirka commented May 20, 2024

I'm not entirely sure about this. What specifically do we want to accomplish by removing the entire component div? And why couldn't a consumer just do options && <ColorPalette /> or something if they wanted that?

@mirka
Copy link
Member

mirka commented Jul 25, 2024

I ran into this issue and I get it now. It's wrapped in a VStack and will leave an unwanted margin if we leave the empty div.

Extra margin on ColorPalette
@mirka mirka added [Type] Bug An existing feature does not function as intended [Package] Components /packages/components and removed [Type] Enhancement A suggestion for improvement. [Feature] UI Components Impacts or related to the UI component system labels Jul 25, 2024
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
2 participants