Skip to content

SANDBOX-1067 | fix: button is incorrectly disabled and style changes#47

Merged
MikelAlejoBR merged 2 commits intocodeready-toolchain:masterfrom
MikelAlejoBR:SANDBOX-1067-fix-bug-implement-feedback
Mar 26, 2026
Merged

SANDBOX-1067 | fix: button is incorrectly disabled and style changes#47
MikelAlejoBR merged 2 commits intocodeready-toolchain:masterfrom
MikelAlejoBR:SANDBOX-1067-fix-bug-implement-feedback

Conversation

@MikelAlejoBR
Copy link
Contributor

@MikelAlejoBR MikelAlejoBR commented Mar 24, 2026

There was a bug which made the "reset workspaces" button to be disabled when the user was completely provisioned. It was due to a boolean variable that should have been flipped, as it was disabling the button when the user was ready, instead of doing it when it was NOT ready.

This commit also includes some style changes requested by the UX team.

Jira ticket

[SANDBOX-1067]

Summary by CodeRabbit

  • Bug Fixes

    • Fixed availability logic for the "Reset workspaces" action.
    • Corrected display of the "Only for active trials" message.
  • Style

    • Improved button styling for better visual hierarchy in the reset workspace dialog.
    • Enhanced warning alert presentation and formatting.

There was a bug which made the "reset workspaces" button to be disabled
when the user was completely provisioned. It was due to a boolean
variable that should have been flipped, as it was disabling the button
when the user was ready, instead of doing it when it was NOT ready.

This commit also includes some style changes requested by the UX team.

SANDBOX-1067
@coderabbitai
Copy link

coderabbitai bot commented Mar 24, 2026

Walkthrough

A single component file is modified to invert logic conditions for when the "Reset workspaces" action is selectable and its secondary message is visible, swap button variant styles, wrap an alert element in a Box component, and adjust text formatting.

Changes

Cohort / File(s) Summary
Sandbox Reset Component
plugins/sandbox/src/components/SandboxResetWorkspaces/SandboxResetWorkspacesLink.tsx
Inverted disabled and message conditions from userReady to !userReady. Wrapped warning Alert in Box with updated styling. Swapped button variants: "Reset" from outlined to contained, "Cancel" from contained to outlined. Adjusted warning text line breaks.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: fixing incorrect button disable state and applying style updates, which aligns with the core changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@mfrancisc mfrancisc left a comment

Choose a reason for hiding this comment

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

Looks good 👍

Just wondering why it wasn't cought by the unit test ?

@openshift-ci
Copy link

openshift-ci bot commented Mar 24, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alexeykazakov, mfrancisc, MikelAlejoBR

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [MikelAlejoBR,alexeykazakov,mfrancisc]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mfrancisc
Copy link
Contributor

/retest

@MikelAlejoBR MikelAlejoBR merged commit 2d693a4 into codeready-toolchain:master Mar 26, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants