-
Notifications
You must be signed in to change notification settings - Fork 58
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
Use format-library for the formatting bar #275
Conversation
cc3f557
to
8061eb7
Compare
I tried this on Android and (besides the fact that I had to temporarily comment out the moduleDidMount call which is not available on Android) it seems that the selected word is not picked up as a whole. See the following gif: (the |
@hypest Thanks for reviewing. Strangely, I'm unable to reproduce this issue. Could it be possible that you tested while I was rebasing the gutenberg PR about an hour ago? |
I can try again now just to be sure and will report back 👍 |
Still happening for me on 08e345a. Using a Pixel 2 XL, Android 9. |
Those buttons look really odd there, is that the final design? |
@hypest Thanks! I thought I had fixed it with WordPress/gutenberg@f7513a8 but it seems it only works in Aztec iOS... I just added a hack to fix the problem. I think it's good enough for our need for now, but we might want to revisit later.
I think they should be good enough for this first version, I used |
@iamthomasbishop what do you think? If there's no way we can make those look more like the designs, I think it might be better to at least drop the colors and keep them both white |
I can confirm that latest fixes have removed the missing character issue @Tug 👍. |
Can you also update this PR from master @Tug ? There's an annoying issue where on Android the app red-screens on start because it tries to contact the bridge, which is already fixed in master. |
@hypest Sure, it's done now :) |
3184d2d
to
d8ac9cf
Compare
@Tug, can you verify that Bold/Italic/Strikethrough are working for you in the paragraph block (possibly in other too) when just toggling the format without anything selected? When I try it on Android I don't see the formats "stick". Steps:
|
@koke @iamthomasbishop Updated the Buttons to use a custom version instead (will need to be refactored in @hypest Haven't tested Android much tbh. Looking now 👍 |
I removed my previous comment since I hadn't actually pulled the latest changes correctly 🤦♂️ |
Sorry for the delay! This is looking pretty dang solid for the quick first iteration! Well done. A couple immediate thoughts to get this shipped and in test hands:
For reference, here's kinda where the designs were at for links between platforms, but I'm not necessarily expecting us to get there immediately: Thanks! |
I've changed the target branch to |
a2f6888
to
5241d60
Compare
@danielebogo Right I did notice those problems as well at different points but didn't manage to find the cause except for the fact that, due to a sequence of events, Aztec and gutenberg-mobile gets de-synchronized and that one editor does not convert to the the same html as the other. @hypest @koke Imo it's still not ready to merge, I'd like to spend some more time on it and see if we can mitigate those issues and at least fix the rendering loop problem. |
😢 The rendering loop sounds like a merge blocker, I think the other two we could solve incrementally on a separate PR |
Another thing: it seems AztecEditor-iOS returns |
A bad merge in 41f1708 got rid of it
Just mentioning it here for tracking it: there's a known issue: "b" tags are not recognised by the format-library as "bold" so, the toolbar doesn't highlight the "B" button when the cursor is on a |
A note on the styling of this sheet as we work towards shipping it – the styling of the Sheet component has been changed/consolidated, so we'll need to update the styling slightly. I understand we're getting close to shipping so I'm hoping this doesn't add much work – it'll just feel odd relative to the other updated sheets (Inserter in-progress, Image Settings done, Media stuff done). Here's what the updated "neutral" Sheet looks like: (iOS left, Android right)The notable differences:
Might be worth coordinating with @etoledom and @marecar3 to figure out how they've been styling/re-using the component. |
Just ended another round of testing and the rendering loop issue is gone. Although I've found the problem with toolbar/styling pretty annoying. Once it happens you cannot go back to plain text. Even if you switch to another block , and then back to the "problematic" one, the issue is still there. https://cloudup.com/cXNXc52YxKK I've also tried by jumping to another block and back, with no luck. |
Here's a quick list of the issues that still seem outstanding (will create tickets later):
Will now update the PRs and start the merge domino since we haven't deemed any of the issues as blockers for merging this and iterating on follow up PRs. cc @koke |
Tested on 12.1 and it seems to work fine 🎉 |
This PR is here to help test the changes in gutenberg: WordPress/gutenberg#12249
Requires changes in Aztec: wordpress-mobile/AztecEditor-Android#777
Requires RN Aztec changes wordpress-mobile/react-native-aztec#105Testing Instructions (for Android)
You can use the following command for this:
gutenberg-mobile
and checkout this patchyarn android
or launch with Android StudioTesting Instructions (for iOS)
yarn ios
or launch with XCode