Skip to content

Conversation

dhruvikpatel18
Copy link
Contributor

Closes #69603

What?

This PR modifies the Snackbar component to support up to two actions instead of just one, enhancing user interaction capabilities.

Why?

The current Snackbar component is limited to a single action button, which restricts user interactions in common scenarios. This change allows for more flexible and intuitive interactions such as:

  • User feedback prompts: "Are you satisfied?" → Yes / No
  • Critical undo actions: "Message sent" → Undo / View message
  • Task confirmations: "Save changes?" → Save / Discard

This enhancement aligns with established UX patterns seen in many modern interfaces and eliminates the need for plugin authors to create workarounds.

How?

  1. Modified the validation logic to allow up to two actions instead of one
  2. Updated the warning message to reflect the new limit
  3. Added character length validation for action labels to keep the UI clean
  4. Updated tests to verify the new functionality

@Mamaduka Mamaduka added [Type] Enhancement A suggestion for improvement. Needs Design Feedback Needs general design feedback. [Feature] UI Components Impacts or related to the UI component system labels Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] UI Components Impacts or related to the UI component system Needs Design Feedback Needs general design feedback. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow Snackbar component to support two actions for better user interaction and flexibility
2 participants