-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Mobile: Link image setting #13654
Mobile: Link image setting #13654
Conversation
…-sheet header buttons
Thanks for the review @pinarol ! I pushed a commit with one of the fixes. About the colors, I think that we should organize better how do we work with global color declarations in mobile. Since we use many of those in
It doesn't :)
In web, the url type is a picker, and the only one editable by the user is the On web, I can set the URL to Since we don't have the picker yet in mobile, and since it's always editable, I think it makes sense to automatically change it to custom, if the user customize it in any way. Still, I'll mention this to Thomas to be sure and we can modify this behavior in the future 👍 |
Alright, I thought we'd be breaking the result url here because custom url's are appended at the end of the site url. But as far as I see it handles redirection pretty well and our result link won't be broken even if we change the link type as custom while leaving the image url as is. So it looks like we don't have to worry for now. |
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.
thanks @etoledom LGTM! 🎉
one optional thing: it was hard to select the whole url text and change it, there's no "select all" option available here:
Maybe we can tackle and see why "select all" does not appear.
Or maybe we can select the whole text when user focuses on the url. Just an idea.
Thank you @pinarol ! I did a fast check and there is the It doesn't appear when there is already text selected, but I think that is normal behavior, right? |
…rnmobile/372-fix-image-caption-font-family * 'master' of https://github.com/WordPress/gutenberg: Update CODEOWNERS Project: Avoid additional native-file code owner notification (#13675) Mobile: Link image setting (#13654) # Conflicts: # packages/block-library/src/image/styles.native.scss
actually when I test this in other text fields I see "select all" even if a small amount of text is selected. maybe that's the case where there are multiple words. I feel like we are having different experience maybe because I had a link that is longer than the text field width and didn't have the option to long press to somewhere outside of the text. but knowing that this option is visible to you it looks like it is an ios behavior and we don't have something to fix here 🤷♀️ |
* rnmobile: Implement image settings button using InspectorControls.Slot pattern. * rnmobile: Add missing semicolon * rnmobile: Adding bottom-sheet component to mobile * rnmobile: Styling bottom-sheet header * rnmobile: Bottom-sheet clean up * rnmobile: Fix lint issues on bottom-sheet related code. * rnmobile: Fix small lint issues * rnmobile: Move inline toolbar button definition out of constant. * rnmobile: Remove extra white-spaces * revert package-lock.json changes * rnmobile: Fix merge issue * rnmobile: Imported BaseControl and TextinputControl to be used on Alt Image Settings * rnmobile: exporting component BottomSheet.Button to be used as bottom-sheet header buttons * rnmobile: Adding BottomSheet.Cell component as an extraction for BottomSheet users. * Fix lint issues * Reverting changes to package-lock.json * Fix merge issues * Remove Done button from Image settings bottom sheet * Make bottom-sheet avoid being behind keyboard * Fix lint issues * Making BottomSheet.Cell value editable as textinput. * Remove unnecesary onPress prop from Alt cell. * Image Settings: Added Link To setting to bottom-sheet * BottomSheet desing details * Fix bottom-sheet cell value growing larger than container * Bottom-sheet: Fix bottom safe-area inset with keyboard showing * Fix lint issues * Adding textinput props to bottom-sheet cell value. * Removing autocorrect from link-setting text input. * Fix lint issues * Fixing label texts on Image Settings bottom-sheet * Mobile ImageEdit color using global definition.
* rnmobile: Implement image settings button using InspectorControls.Slot pattern. * rnmobile: Add missing semicolon * rnmobile: Adding bottom-sheet component to mobile * rnmobile: Styling bottom-sheet header * rnmobile: Bottom-sheet clean up * rnmobile: Fix lint issues on bottom-sheet related code. * rnmobile: Fix small lint issues * rnmobile: Move inline toolbar button definition out of constant. * rnmobile: Remove extra white-spaces * revert package-lock.json changes * rnmobile: Fix merge issue * rnmobile: Imported BaseControl and TextinputControl to be used on Alt Image Settings * rnmobile: exporting component BottomSheet.Button to be used as bottom-sheet header buttons * rnmobile: Adding BottomSheet.Cell component as an extraction for BottomSheet users. * Fix lint issues * Reverting changes to package-lock.json * Fix merge issues * Remove Done button from Image settings bottom sheet * Make bottom-sheet avoid being behind keyboard * Fix lint issues * Making BottomSheet.Cell value editable as textinput. * Remove unnecesary onPress prop from Alt cell. * Image Settings: Added Link To setting to bottom-sheet * BottomSheet desing details * Fix bottom-sheet cell value growing larger than container * Bottom-sheet: Fix bottom safe-area inset with keyboard showing * Fix lint issues * Adding textinput props to bottom-sheet cell value. * Removing autocorrect from link-setting text input. * Fix lint issues * Fixing label texts on Image Settings bottom-sheet * Mobile ImageEdit color using global definition.
Description
This PR implements the Link setting on the image block, using the BottomSheet component.
Since on Mobile we have just a textfield (as in Aztec), when the user edit a URL in mobile, it will be automatically changed to
custom
.This PR also adds some fine tune to the BottomSheet design.
To test:
WPiOS:
gutenberg-mobile
andyarn start
.GB Web
Custom URL
is there.Custom URL
toMedia File
WPiOS again:
Custom URL
.