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

ToggleGroupControl: Visual state of an undefined value is inconsistent #35383

Closed
Tracked by #34345
mirka opened this issue Oct 6, 2021 · 9 comments · Fixed by #35545
Closed
Tracked by #34345

ToggleGroupControl: Visual state of an undefined value is inconsistent #35383

mirka opened this issue Oct 6, 2021 · 9 comments · Fixed by #35545
Assignees
Labels
[Feature] Component System WordPress component system [Package] Components /packages/components [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@mirka
Copy link
Member

mirka commented Oct 6, 2021

Description

The visual state of an initial undefined value is different from when the value is set back to undefined after being set to a defined value.

Step-by-step reproduction instructions

  1. Render a ToggleGroupControl with value initially undefined.
  2. Render a button with an onClick to set the value to undefined.
  3. Click on one of the toggle group options, then click the reset button.

https://codesandbox.io/s/togglegroupcontrol-undefined-state-h8z9q?file=/src/App.js

Screenshots, screen recording, code snippet

An initial undefined value looks different from when the value is set from a truthy value back to undefined

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@mirka mirka added [Type] Bug An existing feature does not function as intended [Package] Components /packages/components [Feature] Component System WordPress component system Good First Issue An issue that's suitable for someone looking to contribute for the first time labels Oct 6, 2021
@sRahul-00
Copy link

Hey there, can I work on this issue?

@mirka
Copy link
Member Author

mirka commented Oct 6, 2021

@sRahul-00 Sure thing, thank you!

I'll add that I probably think the correct visual state for undefined should be the initial, white one, instead of the black with grayed out text. Would you agree?

@sRahul-00
Copy link

@sRahul-00 Sure thing, thank you!

I'll add that I probably think the correct visual state for undefined should be the initial, white one, instead of the black with grayed out text. Would you agree?

Yeah man!! Totally agreed...

@ntsekouras ntsekouras removed the Good First Issue An issue that's suitable for someone looking to contribute for the first time label Oct 7, 2021
@ntsekouras
Copy link
Contributor

Hey @sRahul-00 👋 - thanks for your interest for this issue! Really appreciate it!!

This fix will be needed for the next WP version 5.9 and is a bit of time sensitive. Would it be possible to work on this soon? I'm happy to help and guide you with whatever you need 😄

I'll add that I probably think the correct visual state for undefined should be the initial, white one, instead of the black with grayed out text. Would you agree?

Yes, the backdrop should be removed when the selected value doesn't exist as an option.

@sRahul-00
Copy link

Hey @sRahul-00 👋 - thanks for your interest for this issue! Really appreciate it!!

This fix will be needed for the next WP version 5.9 and is a bit of time sensitive. Would it be possible to work on this soon? I'm happy to help and guide you with whatever you need 😄

Yeah, sure. I'm new to this Open Source World, so I will be thrilled to work upon new opportunities.

@ntsekouras
Copy link
Contributor

Hey @sRahul-00 👋 - that's great! So did you try anything for the issue? Will you pick it up?

@sRahul-00
Copy link

Hey @sRahul-00 👋 - that's great! So did you try anything for the issue? Will you pick it up?

I'm really sorry. I couldn't a thing as I was really busy due to the construction going in my home. I'm really sorry again.

@ntsekouras
Copy link
Contributor

No worries at all! Do you want me to pick it up and find yourself another good first issue? I'd be happy to help either way - you can ping me in the wordpress.slack for anything you want 😄

@sRahul-00
Copy link

yeah sure!! But after you're done, I request you to tell me how did you fix it. It'd be really helpful for beginner like me. Best of Luck btw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Component System WordPress component system [Package] Components /packages/components [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants