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

Fix: Generate/regenerate/rescan buttons do not work in media modal when editing a post #295

Merged
merged 5 commits into from
Aug 26, 2021

Conversation

dinhtungdu
Copy link
Contributor

Description of the Change

The buttons in the media only work under the Media library page. This happens because we only listen to edit:attachment event triggered when you open the media modal of an image on the Media library page. This PR adds a listener to another event to make the buttons work when editing a post.

Verification Process

  1. Build new assets.
  2. Edit a post using the block editor, see buttons work.
  3. Edit a post using the classic editor, see buttons work.
  4. Edit an attachment, see buttons work.

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests passed.

Applicable Issues

Close #292.

Changelog Entry

Fixed: Ensure Image Processing buttons in the media modal work when editing posts.

@dinhtungdu dinhtungdu self-assigned this Jul 21, 2021
@jeffpaul jeffpaul requested a review from helen July 21, 2021 17:54
@jeffpaul jeffpaul added this to the 1.7.0 milestone Jul 21, 2021
@jeffpaul jeffpaul added the type:bug Something isn't working. label Jul 21, 2021
@helen
Copy link
Contributor

helen commented Jul 22, 2021

This does work now for existing items; however, it doesn't seem to work for new uploads within that modal "session" - they'll work if you close the modal and reopen it, though. Maybe it has to be bound a different way for that? Perhaps not a blocker since there's a workaround but wanted to note it in case we want to log it as as separate issue and release with it this way, which is already better.

@dinhtungdu
Copy link
Contributor Author

they'll work if you close the modal and reopen it

@helen they also work if you unselect then select again. I tried to fix this issue as well but it's not simple as it seems. I will look at it again next week.

@helen
Copy link
Contributor

helen commented Aug 26, 2021

Just noting in writing that while less than great the fix is still better than before so we can figure out the final piece (not having to click away and then back to have the buttons work) later on.

@helen helen merged commit ac73ed2 into develop Aug 26, 2021
@helen helen deleted the fix/292 branch August 26, 2021 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BLOCKER] Generate/regenerate/rescan buttons do not work in media modal when editing a post
3 participants