-
Notifications
You must be signed in to change notification settings - Fork 307
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
chore(content-explorer): Migrate deleteConfirmationDialog #3696
base: master
Are you sure you want to change the base?
Conversation
05102e1
to
59e4c49
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small things
<Modal onOpenChange={onCancel} open={isOpen}> | ||
<Modal.Content | ||
aria-label={formatMessage(messages.deleteDialogLabel)} | ||
className="bce-DeleteConfirmationDialog" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this class needed?
isOpen, | ||
onDelete, | ||
onCancel, | ||
item, | ||
isLoading, | ||
parentElement, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: alphasort
</Modal.Footer> | ||
</Modal.Content> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the rename dialog also includes a close button, do we need it here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when the modal is opened, what is the element that is focused?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
close is focused, confirmed by hitting enter and a console.log after its open
59e4c49
to
f09447c
Compare
780e224
to
4598961
Compare
src/elements/common/modal.scss
Outdated
@@ -6,6 +8,10 @@ | |||
justify-content: center; | |||
padding: 15px 0 0; | |||
|
|||
[class^='bp_base_button_module_button']:last-child { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have to put this here until we can use button
instead once all the modals have been converted
92eb0e3
to
3706296
Compare
src/elements/common/modal.scss
Outdated
@@ -6,6 +8,10 @@ | |||
justify-content: center; | |||
padding: 15px 0 0; | |||
|
|||
[class^='bp_base_button_module_button']:last-child { | |||
margin-inline-start: tokens.$space-3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think now we should move towards using the css vars:
@use '@box/blueprint-web-assets/tokens/tokens-css-vars.scss';
...
.component {
background-color: var(--background-background);
}
the scss tokens are deprecated in the docs
> | ||
{formatMessage(messages.delete)} | ||
</Button> | ||
<Button autoFocus disabled={isLoading} onClick={onCancel} size="large" variant="secondary"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is autofocus a property on the blueprint component?
onRequestClose={onCancel} | ||
overlayClassName={CLASS_MODAL_OVERLAY} | ||
parentSelector={() => parentElement} | ||
portalClassName={`${CLASS_MODAL} be-modal-delete`} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is be-modal-delete
used?
src/elements/common/modal.scss
Outdated
@@ -6,6 +8,10 @@ | |||
justify-content: center; | |||
padding: 15px 0 0; | |||
|
|||
[class^='bp_base_button_module_button']:last-child { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i wonder if we should try using the Modal.Footer from blueprint to handle the buttons
@@ -22,27 +18,26 @@ export const deleteDialog = { | |||
setArgs({ isOpen: false }); | |||
}; | |||
|
|||
const { appElement, rootElement } = addRootElement(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
appElement
isn't needed even though it's still using react-modal?
56a8da1
to
2a3127f
Compare
2a3127f
to
fd9a5da
Compare
before
after