-
Notifications
You must be signed in to change notification settings - Fork 434
Replace dismissible with disableClose in Modal #1777
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
Replace dismissible with disableClose in Modal #1777
Conversation
532ef1b
to
49f581c
Compare
/** | ||
* If true, Modals can be dismissed by clicking outside of modal. If unspecified, defaults to dismissible. | ||
* If true, Modals can be dismissed by clicking outside of modal. If unspecified, defaults to disableClose. | ||
*/ | ||
dismissOnClickOutside: PropTypes.bool, |
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.
We have another prop called dismiss...
. I would think we would want to do the same to be consistent?
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.
hey @davidlygagnon, I didn't get you on this? can you kindly clarify :)
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 what @davidlygagnon means is that we keep the semantics similar, e.g. change all dismiss...
to disable...
, similar to the change from dismissable
to disableClose
.
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.
@davidlygagnon What name would you recommend?
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.
Shouldn't that follow the same pattern as disableClose
?
/**
* If true, Modals cannot be dismissed by clicking outside of modal. If unspecified, defaults to disableClose.
*/
disableCloseOnClickOutside: PropTypes.bool,
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.
Got it. Yes, great suggestion.
dismissOnClickOutside
is a default true also, it's just not in the default props, since it defers to the dismissible
if undefined.
dismissOnClickOutside
should become disableCloseOnClickOutside
also.
@davidlygagnon I've created #1916 to handle other default true prop. |
Cool thanks! |
Fixes #503
Additional description
Replaced instances of the prop-type
dismissible
withdisableClose
CONTRIBUTOR checklist (do not remove)
Please complete for every pull request
npm run lint:fix
has been run and linting passes.components/component-docs.json
CI tests pass (npm test
).REVIEWER checklist (do not remove)
components/component-docs.json
tests.Required only if there are markup / UX changes
last-slds-markup-review
inpackage.json
and push.last-accessibility-review
, topackage.json
and push.npm run local-update
within locally cloned site repo to confirm the site will function correctly at the next release.