Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GH-1655] Card Delete : added Confirmation Dialog #1684

Merged
Merged
Changes from 1 commit
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
73f3756
Made confirmationDialogBox from existing dialog component
Oct 13, 2021
92cafb6
Used ConfirmationDialogBox to raise warning before deletion of card p…
Oct 13, 2021
0889666
fixes as ci checks did not pass
Oct 13, 2021
1ad67f5
fixes to pass ci tests
Oct 13, 2021
57b0103
Merge remote-tracking branch 'origin/main' into confirmation-dialog-512
prakharporwal Oct 14, 2021
e5110cb
Flash Message now visible (changed its z-index)
Oct 14, 2021
e79c23b
Confirmation Dialog shows the property name.
Oct 14, 2021
b88755e
fixes for eslint test failure
Oct 14, 2021
b3e7c1c
fixes for eslint test fail
Oct 14, 2021
d6e7533
fixes for eslint test failure
Oct 14, 2021
2de2a66
Merge branch 'confirmation-dialog-512' of https://github.com/prakharp…
Oct 14, 2021
1257059
fix for eslint test failure
Oct 14, 2021
a9b1f9c
Merge branch 'confirmation-dialog-512' of https://github.com/prakharp…
Oct 14, 2021
279c5ba
fixed a wrong subtext string
Oct 14, 2021
b1eeb45
fixed eslint issues in scss
Oct 14, 2021
19d0a1f
i18n en.json for localisation updated
Oct 14, 2021
cb0d316
`en.json;`-wrong file generated by `npm run i18n-extract ` command re…
Oct 14, 2021
6dcf733
On Property Type or Name Change raises warning
Oct 20, 2021
73c0fe9
On Property Type or Name Change raises Confirmation dialog
Oct 20, 2021
c51b9f6
The affected num of cards calculation added.
Oct 20, 2021
0c57541
If prop value not filled change after confirmation
Oct 20, 2021
6a49e0d
Merge branch 'main' into prop-update-warning-1140
Oct 20, 2021
ac1b39a
Merge branch 'prop-update-warning-1140' of /prakharporwal/focalboard …
Oct 20, 2021
4156c03
fixes after ci eslint failure
Oct 20, 2021
0a729e5
fixes after ci eslint failure
Oct 20, 2021
b47c77e
In cardDetailProperty test considered dialog box confirmation
Oct 23, 2021
314e0b1
Added test for confirmationDialogBox
Oct 23, 2021
46a0c7b
Merge branch 'main' into prop-update-warning-1140
Oct 23, 2021
ca5d09a
npm run fix and fixed test failure
Oct 23, 2021
daac92d
snapshot files updated : `npm run updatesnapshot`
Oct 23, 2021
0da6555
ran i18n-extract script
sudoManiac Oct 25, 2021
32a2602
Added memo to Confirm dialog component
Oct 25, 2021
84ccd49
Merge branch 'prop-update-warning-1140' of https://github.com/prakhar…
Oct 25, 2021
7689555
reverted the addition of React.memo() as the feature breaks
Oct 25, 2021
43185b6
added confirmation for card delete
Oct 25, 2021
7b66170
default export of Confirmation Dialog Component
Oct 25, 2021
e936b7f
improved cardDialog test considering dialog box opening
Oct 25, 2021
253c054
Added memo and useCallback for cnfrm dialog component
Oct 28, 2021
a2d290c
eslint formating
Oct 28, 2021
56052ad
eslint formatting
Oct 28, 2021
8a883ee
added confirm dialog for kanban and dialog card .
Oct 28, 2021
3d1ac6f
Merge branch 'main' into card-delete-warning-1655
Oct 28, 2021
cef7afd
updated snapshot . cardDetailProperty test failing
Oct 28, 2021
d36e057
Merge branch 'main' into prop-update-warning-1140
Oct 28, 2021
b972bbf
updated snapshot
Oct 28, 2021
537da5b
Merge branch 'prop-update-warning-1140' into card-delete-warning-1655
Oct 28, 2021
6b43068
Merge branch 'prop-update-warning-1140' into card-delete-warning-1655
Oct 28, 2021
7c714f5
Merge branch 'card-delete-warning-1655' of https://github.com/prakhar…
Oct 28, 2021
c30f0ce
eslint formatting
Oct 28, 2021
d8e6199
Merge branch 'prop-update-warning-1140' into card-delete-warning-1655
Oct 28, 2021
3a61a01
removed unwanted comments
Oct 28, 2021
4bdfcd3
imported library for failing test
Oct 28, 2021
e559a0a
Merge branch 'main' into card-delete-warning-1655
sbishel Nov 2, 2021
27b8d59
Updating card modal scss
asaadmahmood Nov 8, 2021
1cac808
Addressed @sbishel comments
Nov 10, 2021
856a900
Merge branch 'card-delete-warning-1655' of https://github.com/prakhar…
Nov 10, 2021
a997cf7
Merge branch 'main' into card-delete-warning-1655
Nov 10, 2021
c906813
fixed duplicate width in css
Nov 10, 2021
278f7d1
updated comment in kanbanCard
Nov 10, 2021
1faf6cb
fixed failing snapshot test
Nov 10, 2021
633d99e
updated kanbanCard unit test
Nov 10, 2021
3714458
npm run fix
Nov 10, 2021
a7e0039
removed useState hook for confirmDialogProps
Nov 11, 2021
50da81c
removed useState hook from cardDialog and kanbanCard for confirmDialo…
Nov 11, 2021
0da2300
Merge branch 'card-delete-warning-1655' of https://github.com/prakhar…
Nov 11, 2021
864cd17
npm run fix
Nov 11, 2021
aeabafe
removed duplicate declaration
Nov 11, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
npm run fix
  • Loading branch information
Prakhar committed Nov 11, 2021
commit 864cd178fe1dcd2b73efd31b25ab1211b661f499
40 changes: 20 additions & 20 deletions webapp/src/components/cardDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const CardDialog = (props: Props): JSX.Element => {
Utils.assertFailure('card')
return
}

TelemetryClient.trackEvent(TelemetryCategory, TelemetryActions.AddTemplateFromCard, {board: props.board.id, view: activeView.id, card: props.cardId})
await mutator.duplicateCard(
props.cardId,
Expand All @@ -60,26 +60,26 @@ const CardDialog = (props: Props): JSX.Element => {
async () => {
props.showCard(undefined)
},
)
}
const handleDeleteCard = async () => {
if (!card) {
Utils.assertFailure()
return
}
TelemetryClient.trackEvent(TelemetryCategory, TelemetryActions.DeleteCard, {board: props.board.id, view: props.activeView.id, card: card.id})
await mutator.deleteBlock(card, 'delete card')
props.onClose()
}

const confirmDialogProps: ConfirmationDialogBoxProps = {
heading: intl.formatMessage({id: 'CardDialog.delete-confirmation-dialog-heading', defaultMessage: 'Confirm card delete!'}),
confirmButtonText: intl.formatMessage({id: 'CardDialog.delete-confirmation-dialog-button-text', defaultMessage: 'Delete'}),
onConfirm: handleDeleteCard,
onClose: () => {
setShowConfirmationDialogBox(false)
},
)
}
const handleDeleteCard = async () => {
if (!card) {
Utils.assertFailure()
return
}
TelemetryClient.trackEvent(TelemetryCategory, TelemetryActions.DeleteCard, {board: props.board.id, view: props.activeView.id, card: card.id})
await mutator.deleteBlock(card, 'delete card')
props.onClose()
}

const confirmDialogProps: ConfirmationDialogBoxProps = {
heading: intl.formatMessage({id: 'CardDialog.delete-confirmation-dialog-heading', defaultMessage: 'Confirm card delete!'}),
confirmButtonText: intl.formatMessage({id: 'CardDialog.delete-confirmation-dialog-button-text', defaultMessage: 'Delete'}),
onConfirm: handleDeleteCard,
onClose: () => {
setShowConfirmationDialogBox(false)
},
}

const confirmDialogProps: ConfirmationDialogBoxProps = {
heading: intl.formatMessage({id: 'CardDialog.delete-confirmation-dialog-heading', defaultMessage: 'Confirm card delete!'}),
Expand Down