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 pending state to ToggleButton #7256

Open
universse opened this issue Oct 25, 2024 · 3 comments
Open

Add pending state to ToggleButton #7256

universse opened this issue Oct 25, 2024 · 3 comments

Comments

@universse
Copy link

universse commented Oct 25, 2024

Provide a general summary of the feature here

A pending state has been recently introduced in RAC Button. This state is also applicable to ToggleButton.

🤔 Expected Behavior?

ToggleButton has pending state.

😯 Current Behavior

ToggleButton has no pending state.

💁 Possible Solution

No response

🔦 Context

ToggleButton with async handler should have pending state.

#7210

💻 Examples

No response

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

@snowystinger
Copy link
Member

Thanks for opening the issue.
Can you provide examples of when you'd use something like this? Not that it's wrong, just so we have more information.

@nwidynski
Copy link

@snowystinger May be a viable path to re-use <Button /> inside <ToggleButton />?

@universse
Copy link
Author

universse commented Oct 29, 2024

I thought it would be useful for actions that may have uncertain delay and users expect to see a confirmation before moving on. Examples are add to wish list/subscribe button.

However, after reading up on the aria-pressed attribute, I am not sure if ToggleButton is the right component for such use cases, since the button label should remain the same under both on and off states. What do you think?

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

No branches or pull requests

3 participants