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

Set Default state to media library for library button in image block #41678

Merged
merged 3 commits into from
Jun 16, 2022

Conversation

akasunil
Copy link
Member

@akasunil akasunil commented Jun 12, 2022

In Gutenberg Image Block, on click of 'Media Library' button it should open Media Library tab in Media Popup. Instead, it open last opened tab. It confusing for user when they specifically click Media Library button and end up on upload tab in media Popup.

What?

Fixes #41473

Testing Instructions

Please follow step by step instructions to test this PR.

  1. Create new post.
  2. Add Image block.
  3. Click Media Library button.
  4. Click on Upload Tab
  5. Close Popup and click Media Library button.
  6. Make sure it open Media Library tab in Dialog.

Screenshots or screencast

@glendaviesnz
Copy link
Contributor

glendaviesnz commented Jun 12, 2022

This tested well for me. Should we document the mode prop here.

@skorasaurus skorasaurus added [Feature] Media Anything that impacts the experience of managing media [Package] Components /packages/components labels Jun 13, 2022
Copy link
Contributor

@glendaviesnz glendaviesnz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on Image, Gallery and Cover block and worked correctly on all. Thanks for this fix 🎉

@akasunil
Copy link
Member Author

Thank you. glendaviesnz.

@akasunil
Copy link
Member Author

@Mamaduka Can you please review the PR. Thank you.

Copy link
Member

@Mamaduka Mamaduka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sunil25393, it looks like this was already reviewed by @glendaviesnz. So I'm going to merge the PR.

@Mamaduka Mamaduka merged commit 7b47756 into WordPress:trunk Jun 16, 2022
@github-actions github-actions bot added this to the Gutenberg 13.6 milestone Jun 16, 2022
@akasunil akasunil deleted the fix-Initial-state-on-media-popup branch June 16, 2022 10:51
@mburridge mburridge added the Needs Dev Note Requires a developer note for a major WordPress release cycle label Sep 14, 2022
@mburridge
Copy link
Contributor

Added the Needs Dev Note label in case this needs a dev note (either individual or as part of a "misc" dev note) for WP 6.1 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Media Anything that impacts the experience of managing media Needs Dev Note Requires a developer note for a major WordPress release cycle [Package] Components /packages/components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Image block, Initial state on popup incorrect.
5 participants