-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 missing photo permission message in image block #19577
Closed
Closed
Conversation
This file contains 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
guarani
changed the title
Fix missing photo permission msg in image block
Fix missing photo permission message in image block
Nov 10, 2022
Hi @fluiddot, I wasn't sure who to add here as a reviewer. |
You can test the changes in Jetpack from this Pull Request by:
|
You can test the changes in WordPress from this Pull Request by:
|
Generated by 🚫 dangerJS |
Moving this to the 21.6 milestone as I'm running the 21.5 code freeze today and this is in draft state. |
I'm going to close it because it's not obsolete thanks to the changes made in #21190 |
Thanks for closing this, @kean! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #19576
MediaPicker-iOS handles the display of a message when the app lacks photo permission. By implementing a delegate method, the app was overriding this and presenting the prompt from the block editor screen which is hidden behind the media picker screen, leading to this error:
To fix this, I removed the delegate method. This means that the media picker doesn't try to call the delegate method (see code and instead calls
wpm_showAlertWithError
, which in turn shows the same permission alert that's shown when adding media via My Site → Menu → Media (which presents the alert on the media picker view controller, which is on-screen).To test:
a. Go My Site tab → Menu → Media
b. Go to add media, but deny the app permission
Regression Notes
Image block error handling could be inadvertently affected by this change.
I tested adding images via the image block both with and without the photo permission.
There were no existing tests I could easily build upon.
PR submission checklist:
RELEASE-NOTES.txt
if necessary.