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

feat(metadata-sidebar): disable delete button #3677

Merged
merged 4 commits into from
Sep 26, 2024

Conversation

karolinaru
Copy link
Contributor

This pull request disables the Delete button in the MetadataInstanceEditor when a user starts creating a new template. Since there's nothing to delete before the instance is created, the button stays inactive.

Editing new template chosen from dropdown:
Screenshot 2024-09-25 at 17 01 40

Editing already existing instance:
Screenshot 2024-09-25 at 17 01 21

@karolinaru karolinaru requested review from a team as code owners September 25, 2024 15:39
Copy link
Contributor

Choose a reason for hiding this comment

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

we need to add unit tests for when the button is disabled under specific conditions and enabled under different conditions

Copy link
Contributor

Choose a reason for hiding this comment

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

we can also add a storybook story to showcase that the button is disabled

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added both unit and storybook tests

@karolinaru karolinaru force-pushed the disabled-delete-button branch 2 times, most recently from 01410b9 to 081b2af Compare September 26, 2024 10:13
@mergify mergify bot merged commit 2941a97 into box:master Sep 26, 2024
6 checks passed
jankowiakdawid pushed a commit to jankowiakdawid/box-ui-elements that referenced this pull request Sep 27, 2024
* feat(metadata-sidebar): disable delete button

* feat(metadata-sidebar): remove console.log

* feat(metadata-sidebar): unit tests

* feat(metadata-sidebar): storybook tests
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.

4 participants