Skip to content

Conversation

@codyrancher
Copy link
Member

@codyrancher codyrancher commented Oct 21, 2025

Summary

Note: this is for 2.14.

Fixes #10559

Technical notes summary

We were hackily modifying the width of a modal dialog. This uses our existing action-menu store responsible for managing the state of the modals to update the width of the modal which is already reactive.

Areas or cases that should be tested

WorkloadRollbackDialog when switching toggling between show/hide diff.

Areas which could experience regressions

WorkloadRollbackDialog when switching toggling between show/hide diff.

Screenshot/Video

sizedialog.mp4

Checklist

  • The PR is linked to an issue and the linked issue has a Milestone, or no issue is needed
  • The PR has a Milestone
  • The PR template has been filled out
  • The PR has been self reviewed
  • The PR has a reviewer assigned
  • The PR has automated tests or clear instructions for manual tests and the linked issue has appropriate QA labels, or tests are not needed
  • The PR has reviewed with UX and tested in light and dark mode, or there are no UX changes
  • The PR has been reviewed in terms of Accessibility
  • The PR has considered, and if applicable tested with, the three Global Roles Admin, Standard User and User Base

state.modalData = state.modalData || {};

data.forEach(({ key, value }) => {
state.modalData[key] = value;
Copy link
Member Author

Choose a reason for hiding this comment

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

We want to modify properties instead of assign a full new object to modalData because it can trigger a full re-render of a modal which can reset component state unintentionally.

@codyrancher codyrancher marked this pull request as ready for review October 21, 2025 20:38
Copy link
Member

@rak-phillip rak-phillip left a comment

Choose a reason for hiding this comment

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

LGTM

@codyrancher codyrancher merged commit a72f663 into rancher:master Nov 19, 2025
67 of 69 checks passed
@codyrancher codyrancher deleted the size-dialog branch November 19, 2025 16:53
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

Successfully merging this pull request may close these issues.

RollbackWorkloadDialog: Direct Manipulation of CSS in sizeDialog() Function

2 participants