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

fix(playground): disable Share/Clear buttons if empty #10935

Merged
merged 5 commits into from
Apr 23, 2024

Conversation

caugner
Copy link
Contributor

@caugner caugner commented Apr 17, 2024

Summary

(MP-1062)

Problem

It is possible to share a Playground, even if all fields are empty.

Solution

Disable the "Share" field when all fields are empty.

Note: Apply the same to the "Clear" button, because an empty Playground cannot be cleared.


Screenshots

Before

image

After

image

How did you test this change?

Deployed to stage and verified that:

  1. The Share/Clear buttons are disabled when opening the Playground.
  2. The buttons gets enabled when adding content.
  3. The buttons get disabled again when removing all content (either manually or via the "Clear" button).

@caugner caugner marked this pull request as ready for review April 19, 2024 11:07
@caugner caugner requested a review from a team as a code owner April 19, 2024 11:07
Copy link
Member

@LeoMcA LeoMcA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Glad to see relevant code DRYed up too. LGTM 🚀

@caugner caugner merged commit 35dc1d7 into main Apr 23, 2024
15 checks passed
@caugner caugner deleted the disable-share-and-clear-if-empty branch April 23, 2024 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants