Skip to content

Replace window.confirm calls with confirmation modals - #1698

Merged
huss merged 8 commits into
OpenEnergyDashboard:developmentfrom
koki-star:issue-1093-confirm-action-modals
Oct 28, 2026
Merged

huss merged 8 commits into
OpenEnergyDashboard:developmentfrom
koki-star:issue-1093-confirm-action-modals

Conversation

@koki-star

@koki-star koki-star commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Description

Fixes #1093

Author:

This replaces the seven remaining window.confirm calls with OED's existing ConfirmActionModalComponent. The changes cover group area calculations, group child compatibility warnings, meter displayable warnings, map deletion, and large raw-data exports.

The existing confirmation behavior, toast notifications, permissions, size checks, and download logic are preserved. The confirmation messages and buttons were also updated and translated where needed.

Testing completed:

  • Manually tested the Cancel and confirmation actions
  • npm run check
  • Docker test suite: 942 passing, 0 failing, and 1 pending

Type of change

  • Note merging this changes the database configuration.
  • This change requires a documentation update

Checklist

Limitations

None.

Screenshots

I tested all seven confirmation popups. Click each one to view the screenshot.

1. Create Group area create-group-area-confirmation-modal
2. Edit Group area edit-group-area-confirmation-modal
3. Group compatibility warning edit-group-child-compatibility-modal
4. Meter display warning meter-displayable-warning-modal
5. Delete Map map-delete-confirmation-modal
6. Export size warning export-size-warning-modal
7. Admin export limit admin-max-limit-confirmation

@huss huss left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@koki-star First, I am sorry this review took so long (see Discord msg on the OED server in developer channel).

Thank you for your first contribution to OED. I appreciate you figuring out how to do this across different uses in OED. Review and testing found it works as desired. I have made a few comments to consider. Some are questions that may not need any changes. Please let me know if anything is not clear or you have thoughts/questions.

Comment thread src/client/app/translations/data.ts Resolved
@huss huss removed this from OED PR status Sep 22, 2026
@huss huss moved this to Waiting for comments to be addressed & submission updated in OED PR status Sep 22, 2026
@huss

huss commented Oct 7, 2026

Copy link
Copy Markdown
Member

@koki-star I am sweeping open items and wanted to ask you the status of this work. Thanks.

@koki-star

Copy link
Copy Markdown
Contributor Author

@huss Sorry for the slow reply. I pushed a new commit that covers your four comments: the translations, the meter displayable state, the export comments, and the useEffect explanation. I tested it locally. The meter displayable warning works with Cancel and Continue, a change with no warning saves right away, and the raw export confirm works with Cancel and Continue. To see the export modal I set the warning file size to 0 for the test, then set it back. Let me know if anything else needs to change.

@koki-star
koki-star requested a review from huss October 27, 2026 19:28
@huss huss moved this from Waiting to Ready for review in OED PR status Oct 27, 2026

@huss huss left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@koki-star Thank you for the updated code that addressed all my comments. To be safe, I locally merged in development and did a final test where no issues were found. Congratulations on your first accepted contribution to OED.

@huss
huss merged commit 74a1c63 into OpenEnergyDashboard:development Oct 28, 2026
3 checks passed
@github-project-automation github-project-automation Bot moved this from Ready for review to Complete in OED PR status Oct 28, 2026
@koki-star

Copy link
Copy Markdown
Contributor Author

Thanks a lot @huss I learned a lot from your comments on this one. I really appreciate the review and I'm glad it got merged.

@huss

huss commented Oct 28, 2026

Copy link
Copy Markdown
Member

@koki-star It was a pleasure to have you work on OED. If you want to do anything else then simply let OED know.

@koki-star
koki-star deleted the issue-1093-confirm-action-modals branch November 10, 2026 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

Alerts need to be switched

2 participants