-
Notifications
You must be signed in to change notification settings - Fork 1.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
Feature/photo picker for all editors #5644
Conversation
…ss-Android into feature/photo-picker-for-all-editors
Haven't dived into the code yet, but I have a few broad concerns about this removing features that already exist in the legacy/hybrid editor (though not, yet, in Aztec):
|
Oof, I hadn't noticed that. I guess we have two options here:
I'm not wild about either of those, but I think I'd go with the second option. What do you think? |
I'd say the second option sounds better too, but I'm not wild about either one either. What do you think we should do here @bysl? Whatever we decide, should we do the same for the camera (still photo vs video)? |
@@ -855,62 +840,6 @@ public void onClick(DialogInterface dialog, int id) { | |||
return false; | |||
} | |||
|
|||
@Override | |||
public void openContextMenu(View view) { |
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.
With the context menu removed, we should also drop now-dead calls to registerForContextMenu()
and getActivity().openContextMenu()
in all three editor fragments.
Should we disable the rest of the format bar while in media mode for the visual and legacy editors (as we do for Aztec)? |
This is very minor and should be a separate (low priority) issue: With the media picker visible the editor screen is grayed, which suggests that I can't input any text, but with a hardware keyboard I can keep typing. If possible we should probably prevent that. |
I corrected this in 8f2633e. Now tapping the camera or picker icons shows a popup which enables choosing between photos and videos.
I think we're okay not doing this since those editors won't be with us much longer. Note that this PR hides the picker when the link or html buttons are pressed, and pressing any of the other buttons doesn't really impact the picker.
Blah, hadn't thought about that. If it's okay with you, I'd like to open a separate issue for that. |
…ss-Android into feature/photo-picker-for-all-editors
Looks great @nbradbury!
I can live with that 👍
Absolutely 👍 |
To summarize, I think there are just three things left for this PR:
|
I found a crash when launching the camera, taking a photo, and attempting to use it:
This was on a Samsung S3 API18, and also on an API16 emulator. |
Related to permissions, I tried disabling permissions on my Pixel and then trying to use the picker. I get two permissions pop-ups, one for storage and one for camera. If I grant the storage permission but deny the camera permission, I get a Shouldn't we instead launch the picker but re-prompt for permission if and when the user taps the camera button? Or even only ask for storage permission the first time and hold off on camera until it's needed (I'm not sure if that might get complicated with the middle, native picker button though). |
This looks okay to me. Prefer it over another icon where it would be less clear than the text. |
@aforcier I'm not able to reproduce this, but I don't think it's an issue specific to this PR because I didn't change anything with the camera (it uses pre-existing code). Does the same problem occur in
This is also pre-existing code. We should open an issue for this, but we want to ping @kwonye since he's working on soft asks and this is related.
Addressed separately in #5721.
Addressed in 762ef92 |
…ss-Android into feature/photo-picker-for-all-editors
Hmm you're right, I can reproduce in
👍 |
Looks good! Once #5721 is merged (and the rotation issue mentioned there also fixed) and this branch is updated I'll give it a final pass. |
…ss-Android into feature/photo-picker-for-all-editors
I think we're good to go @nbradbury - if you could merge |
…ss-Android into feature/photo-picker-for-all-editors
Done! |
|
Enables the new photo picker for all editors (prior to this PR, it was only enabled for the Aztec editor), which finally does away with the seven-item menu monstrosity 🎉
A simple way to test this is to manually change these two variables.
cc: @daniloercoli