Skip to content

Comments

fix(FR-1784): Replace popconfirm with Modal for image deletion#4809

Merged
graphite-app[bot] merged 1 commit intomainfrom
fix/crrect-logic-for-disabling-delete-button-in-myenvironment-page
Dec 12, 2025
Merged

fix(FR-1784): Replace popconfirm with Modal for image deletion#4809
graphite-app[bot] merged 1 commit intomainfrom
fix/crrect-logic-for-disabling-delete-button-in-myenvironment-page

Conversation

@nowgnuesLee
Copy link
Contributor

@nowgnuesLee nowgnuesLee commented Dec 11, 2025

resolves #4807 (FR-1784)

This PR replaces the Popconfirm component with a BAIModal for deleting customized images in the CustomizedImageList component. The change improves the user experience by:

  1. Using a proper modal dialog with an Alert component to warn users about the irreversible action
  2. Improving the deletion flow by centralizing the deletion logic in the modal
  3. Removing the inFlightImageId state in favor of tracking the image to delete with a dedicated state variable
  4. Properly handling loading states during the deletion process

Checklist:

  • Documentation
  • Minium required manager version
  • Specific setting for review (eg., KB link, endpoint or how to setup)
  • Minimum requirements to check during review
  • Test case(s) to demonstrate the difference of before/after

Copy link
Contributor Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@nowgnuesLee nowgnuesLee marked this pull request as ready for review December 11, 2025 01:21
Copilot AI review requested due to automatic review settings December 11, 2025 01:21
@github-actions
Copy link
Contributor

github-actions bot commented Dec 11, 2025

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements 4.37% 517/11820
🔴 Branches 3.58% 298/8316
🔴 Functions 2.63% 95/3618
🔴 Lines 4.35% 503/11560

Test suite run success

145 tests passing in 14 suites.

Report generated by 🧪jest coverage report action from 4f95d60

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a logic error in the delete button's disabled state for customized images in the MyEnvironment page. The button was incorrectly enabled for the row being deleted and disabled for all other rows, when it should have been the opposite.

Key Changes:

  • Corrected the disabled condition from !== to === to properly disable the button for the row currently being deleted

@nowgnuesLee nowgnuesLee marked this pull request as draft December 11, 2025 01:23
@nowgnuesLee nowgnuesLee force-pushed the fix/crrect-logic-for-disabling-delete-button-in-myenvironment-page branch from 1266cfb to c8568ac Compare December 11, 2025 05:05
@github-actions github-actions bot added size:L 100~500 LoC and removed size:XS ~10 LoC labels Dec 11, 2025
@nowgnuesLee nowgnuesLee changed the title fix(FR-1784): correct logic for disabling delete button in the MyEnvironment Page fix(FR-1784): Replace popconfirm with Modal for image deletion Dec 11, 2025
@nowgnuesLee nowgnuesLee marked this pull request as ready for review December 11, 2025 05:09
Copy link
Contributor

@ironAiken2 ironAiken2 left a comment

Choose a reason for hiding this comment

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

I left some comments :)

@yomybaby yomybaby force-pushed the fix/crrect-logic-for-disabling-delete-button-in-myenvironment-page branch from c8568ac to c90286f Compare December 12, 2025 07:00
@github-actions github-actions bot added area:ux UI / UX issue. area:i18n Localization labels Dec 12, 2025
Copy link
Member

@yomybaby yomybaby left a comment

Choose a reason for hiding this comment

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

LGTM

@graphite-app
Copy link

graphite-app bot commented Dec 12, 2025

Merge activity

resolves #4807 ([FR-1784](https://lablup.atlassian.net/browse/FR-1784))

This PR replaces the Popconfirm component with a BAIModal for deleting customized images in the CustomizedImageList component. The change improves the user experience by:

1. Using a proper modal dialog with an Alert component to warn users about the irreversible action
2. Improving the deletion flow by centralizing the deletion logic in the modal
3. Removing the `inFlightImageId` state in favor of tracking the image to delete with a dedicated state variable
4. Properly handling loading states during the deletion process

**Checklist:**

- [ ] Documentation
- [ ] Minium required manager version
- [ ] Specific setting for review (eg., KB link, endpoint or how to setup)
- [ ] Minimum requirements to check during review
- [ ] Test case(s) to demonstrate the difference of before/after

[FR-1784]: https://lablup.atlassian.net/browse/FR-1784?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
@graphite-app graphite-app bot force-pushed the fix/crrect-logic-for-disabling-delete-button-in-myenvironment-page branch from c90286f to 4f95d60 Compare December 12, 2025 07:39
@graphite-app graphite-app bot merged commit 4f95d60 into main Dec 12, 2025
10 checks passed
@graphite-app graphite-app bot deleted the fix/crrect-logic-for-disabling-delete-button-in-myenvironment-page branch December 12, 2025 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:i18n Localization area:ux UI / UX issue. size:L 100~500 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When deleting committed environment, all delete buttons switch to loading state.

3 participants