Files
webstudio/apps/builder
MichaelandOleg Isonen 85fd2e78b0 feat: add confirmation dialog when deleting a page (#5441)
## Description

This pull request introduces a new feature that adds a confirmation
dialog when deleting a page, helping prevent accidental deletions.

Related issue:
[#5418](https://github.com/webstudio-is/webstudio/issues/5418)

## Changes

1. Updated `page-settings.tsx` to include a new
`DeleteConfirmationDialog` component.
2. The dialog prompts users to confirm or cancel before a page is
deleted.
3. Enhances user safety and improves UX by preventing unintended
deletions.
(See the image below for a preview of the dialog.)

## How to Test
1. Open any project.
2. Add a new page.
3. Attempt to delete the page, the confirmation dialog should appear
instead of immediately deleting.
4. Clicking Delete should remove the page; clicking Cancel should close
the dialog without deleting.

<img width="1283" height="855" alt="image"
src="https://github.com/user-attachments/assets/d63afe08-75f4-4a53-9e17-50aed4f1330a"
/>

---------

Co-authored-by: Oleg Isonen <oleg008@gmail.com>
2025-11-12 13:00:30 +01:00
..