-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Try using DataViewsPicker in an updated media modal #71944
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
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
9b167f8
Try using DataViewsPicker in an updated media modal
tellthemachines e1fc930
Improve modal style
tellthemachines 5fe8b7f
Make modal private
tellthemachines 08779c3
Add media modal experiment and adapter
tellthemachines 2d43884
more grammar
tellthemachines 5f1d67b
ignore the stupid error
tellthemachines 7d693a6
Add new filter for the new media modal
tellthemachines b7b2c4a
Use experiment in FeaturedImageEdit
tellthemachines 71460e1
add dataviews styles to editor package
tellthemachines 0bd40fd
Add filter to edit- and customize-widgets
tellthemachines 9d3f37a
remove check in featured image
tellthemachines 18c0e04
enable selecting across multiple pages
tellthemachines 3c7dc79
remove changelog update
tellthemachines 24a1d55
Add package references
tellthemachines 4ceaf17
Add dropzone
tellthemachines 226aa6d
use untransformed data in picker
tellthemachines 27a7af4
Add new modal to post featured image
tellthemachines File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
packages/block-editor/src/components/media-upload-modal/index.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| /** | ||
| * WordPress dependencies | ||
| */ | ||
| import { withFilters } from '@wordpress/components'; | ||
|
|
||
| /** | ||
| * This is a placeholder for the media upload modal component necessary to make it possible to provide | ||
| * an integration with the core blocks that handle media files. By default it renders nothing but | ||
| * it provides a way to have it overridden with the `editor.MediaUploadModal` filter. | ||
| * | ||
| * @return {Component} The component to be rendered. | ||
| */ | ||
| const MediaUploadModal = () => null; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Very minor as well, but I wonder if it could be called something like |
||
|
|
||
| /** | ||
| * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/media-upload-modal/README.md | ||
| */ | ||
| export default withFilters( 'editor.MediaUploadModal' )( MediaUploadModal ); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Minor: I know it's a temporary component for the experiment, but maybe it's worth only having one of these components in the block editor package that's imported where needed within the package.
I was wondering if the logic could be in the existing MediaUpload, though I guess that means anyone importing the component gets new modal. Maybe there are also other concerns with that.
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.
Yeah, I was just going to comment with a similar idea. Could we put
ConditionalMediaUploadincomponents/media-upload-modalto remove a little duplication? Not a huge issue, just a nit 😄