-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
DataView Actions Modal: Allow customizable modal size
through props
#69302
DataView Actions Modal: Allow customizable modal size
through props
#69302
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @VanshDagar27. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
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.
Looks good to me
modal size
through propsmodal size
and focusOnMount
through props
8964fd6
to
65d7170
Compare
The failing test case is unrelated to the changes made in this PR and passes locally. |
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.
This seems to work well in principle. It would be great to also get a 👍 from @ntsekouras, @jorgefilipecosta and/or @oandregal (although we don't have much time to work on Gutenberg, these days).
packages/dataviews/src/components/dataviews-item-actions/index.tsx
Outdated
Show resolved
Hide resolved
modal size
and focusOnMount
through propsmodal size
through props
8b09376
to
78ad11a
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.
LGTM 👍There are currently some e2e test failures on trunk, but we'll merge once those are resolved.
Rebasing should resolve e2e testing failures. |
a6ec7b8
to
dc3ff35
Compare
What?
Closes #69294
This PR would allow the consumers to set up the
modal size
withinDataView actions
.Why?
The consumer implementation supports various modal behaviors but does not specify the
size
prop, which the internalModal
component supports. Currently, the size prop is hardcoded.How?
The type declarations for
ActionModal
have been updated, allowingaction.modalSize
to be used as the prop for customization.Testing Instructions
npm run storybook:dev
).modalSize
prop here in the action with iddelete
:gutenberg/packages/dataviews/src/components/dataviews/stories/fixtures.tsx
Line 578 in 8898589
modal size
changes.Screencast
dataviews.mov