Skip to content

Commit e996e43

Browse files
committed
feat: add confirmation dialog component for comment deletion
- Introduced VeltConfirmDialogWf component for handling comment deletion confirmations. - Added associated styles for the confirmation dialog in styles.css. - Integrated the confirmation dialog into VeltCustomization component. This enhances user experience by providing a clear confirmation step before deleting comments.
1 parent f2b2963 commit e996e43

File tree

3 files changed

+131
-1
lines changed

3 files changed

+131
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import { VeltConfirmDialogWireframe } from "@veltdev/react";
2+
import { Close } from "./Icons";
3+
4+
const VeltConfirmDialogWf = () => {
5+
return <VeltConfirmDialogWireframe>
6+
<div className="oe-confirm-dialog-close-button">
7+
<VeltConfirmDialogWireframe.RejectButton>
8+
<Close width={20} height={20} />
9+
</VeltConfirmDialogWireframe.RejectButton>
10+
</div>
11+
<VeltConfirmDialogWireframe.Title>
12+
<div className="oe-confirm-dialog-title">Delete Comment?</div>
13+
</VeltConfirmDialogWireframe.Title>
14+
<VeltConfirmDialogWireframe.Message>
15+
<div>This action cannot be undone.</div>
16+
<div>Documents uploaded while commenting will not be deleted when the comment is deleted. Go to the job Details tab, Documents section to manage documents.</div>
17+
</VeltConfirmDialogWireframe.Message>
18+
<div className="oe-confirm-dialog-buttons">
19+
<VeltConfirmDialogWireframe.RejectButton>
20+
<div className="oe-confirm-dialog-cancel-button">
21+
Cancel
22+
</div>
23+
</VeltConfirmDialogWireframe.RejectButton>
24+
<VeltConfirmDialogWireframe.ApproveButton>
25+
<div className="oe-confirm-dialog-delete-button">
26+
Delete Comment
27+
</div>
28+
</VeltConfirmDialogWireframe.ApproveButton>
29+
</div>
30+
</VeltConfirmDialogWireframe>
31+
}
32+
33+
export default VeltConfirmDialogWf;

apps/react/comments/dashboard/self-hosting/dashboard-postgres-demo/components/velt/ui-customization/VeltCustomization.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import VeltCommentsSidebarFocusedThreadWf from './VeltCommentsSidebarFocusedThre
1212
import VeltCommentsSidebarEmptyPlaceholderWf from './VeltCommentsSidebarEmptyPlaceholderWf';
1313
import VeltNotificationWf from './VeltNotificationPanelWf';
1414
import VeltNotificationListItemWf from './VeltNotificationListItemWf';
15+
import VeltConfirmDialogWf from './VeltConfirmDialogWf';
1516

1617
export function VeltCustomization() {
1718

@@ -29,6 +30,7 @@ export function VeltCustomization() {
2930
<VeltCommentsSidebarEmptyPlaceholderWf />
3031
<VeltNotificationWf />
3132
<VeltNotificationListItemWf />
33+
<VeltConfirmDialogWf />
3234
</VeltWireframe>
3335
);
3436
}

apps/react/comments/dashboard/self-hosting/dashboard-postgres-demo/components/velt/ui-customization/styles.css

Lines changed: 96 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1355,4 +1355,99 @@ app-if {
13551355

13561356
app-notifications-panel-view-all-button {
13571357
display: none !important;
1358-
}
1358+
}
1359+
1360+
1361+
.velt-confirm-dialog {
1362+
padding: 32px !important;
1363+
width: 552px !important;
1364+
position: relative !important;
1365+
}
1366+
1367+
.velt-mat-dialog-container
1368+
mat-dialog-container
1369+
.mat-mdc-dialog-surface.mdc-dialog__surface:has(snippyly-confirm-dialog) {
1370+
border-radius: 4px !important;
1371+
}
1372+
1373+
.oe-confirm-dialog-close-button {
1374+
position: absolute;
1375+
top: 16px;
1376+
right: 16px;
1377+
color: #6b758a;
1378+
border-radius: 4px;
1379+
padding: 4px;
1380+
cursor: pointer;
1381+
1382+
&:hover {
1383+
background-color: #f3f4f6;
1384+
}
1385+
}
1386+
1387+
.oe-confirm-dialog-title {
1388+
font-weight: 500;
1389+
font-size: 24px;
1390+
leading-trim: NONE;
1391+
line-height: 36px;
1392+
letter-spacing: 0.15px;
1393+
color: #00102e;
1394+
}
1395+
1396+
.velt-confirm-dialog-message {
1397+
font-weight: 300 !important;
1398+
font-size: 16px !important;
1399+
leading-trim: NONE !important;
1400+
line-height: 24px !important;
1401+
letter-spacing: 0.3px !important;
1402+
color: #6b758a !important;
1403+
padding: 0px !important;
1404+
margin: 16px 0px 32px 0px !important;
1405+
display: flex !important;
1406+
flex-direction: column !important;
1407+
gap: 24px !important;
1408+
}
1409+
1410+
.oe-confirm-dialog-buttons {
1411+
display: flex !important;
1412+
flex-direction: row !important;
1413+
gap: 16px !important;
1414+
1415+
.oe-confirm-dialog-cancel-button {
1416+
cursor: pointer !important;
1417+
height: 40px !important;
1418+
border-radius: 3px !important;
1419+
display: flex !important;
1420+
align-items: center !important;
1421+
justify-content: center !important;
1422+
border: 1px solid #e6e8ed !important;
1423+
box-shadow: 0px 1px 2px 0px #00102e0f !important;
1424+
font-weight: 500 !important;
1425+
font-size: 14px !important;
1426+
leading-trim: NONE !important;
1427+
line-height: 21px !important;
1428+
letter-spacing: 0.25px !important;
1429+
text-align: center !important;
1430+
vertical-align: middle !important;
1431+
color: #3c475c !important;
1432+
}
1433+
1434+
.oe-confirm-dialog-delete-button {
1435+
cursor: pointer !important;
1436+
height: 40px !important;
1437+
border-radius: 3px !important;
1438+
display: flex !important;
1439+
align-items: center !important;
1440+
justify-content: center !important;
1441+
background-color: #F75452 !important;
1442+
border: 1px solid #CA3D3D !important;
1443+
box-shadow: 0px 1px 2px 0px #00102E0F !important;
1444+
font-weight: 500 !important;
1445+
font-size: 14px !important;
1446+
leading-trim: NONE !important;
1447+
line-height: 21px !important;
1448+
letter-spacing: 0.25px !important;
1449+
text-align: center !important;
1450+
vertical-align: middle !important;
1451+
color: #ffffff !important;
1452+
}
1453+
}

0 commit comments

Comments
 (0)