-
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
[Modal Layout Picker] "Create Page" button functionality #12943
Conversation
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
You can test the changes on this Pull Request by downloading the APK here. |
ada5da6
to
55ed133
Compare
I can review this PR tomorrow unless someone beats me to it. |
3286d6e
to
7db8801
Compare
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 @antonis! The code changes look good overall. However, I've found some bugs, but I'm not sure if they are related to this PR. Either way, I can't test it properly.
- The "unsupported blog" appears only after I rotate the device. There is a bunch of dialogs stacked on top of each other.
P.S. Ignore the red logs :)
mqt_native_modules
Process: org.wordpress.android.prealpha, PID: 2963
com.facebook.react.common.JavascriptException: TypeError: undefined is not a function, js engine: hermes, stack:
anonymous@1899:3372
apply@-1
value@75:1280
apply@-1
value@55:3685
anonymous@55:841
value@55:2939
value@55:813
at com.facebook.react.modules.core.ExceptionsManagerModule.reportException(ExceptionsManagerModule.java:71)
at java.lang.reflect.Method.invoke(Native Method)
at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:371)
at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:150)
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
WordPress/src/main/java/org/wordpress/android/ui/mlp/ModalLayoutPickerFragment.kt
Outdated
Show resolved
Hide resolved
Hello @malinajirka 👋 , thank you for reviewing this today. I really appreciate it 🙇
Both bugs are reproduced with layouts that contain unsupported blocks. Those will be filtered out by the next PR and are out of scope for testing in my understanding (cc @chipsnyder ). I tried to reproduce bug (2) with a supported layout but couldn't reproduce the crash. Let me know if that's not the case. |
That's accurate the unsupported blocks will be filtered out later. Thanks for calling these issues out though they both appear to issues with the Gutenberg editor as a whole. I'll try to reproduce these and open an issue in Gutenberg for them |
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.
Ohh I see. When you mentioned that we'll filter out the layouts with unsupported blogs I thought I should just ignore the unsupported blogs in the editor - not that I shouldn't use them for testing. Either way, I re-tested the app and the content is added as expected. ;) Good job! (btw issue 2
happens even with a supported layout cc @chipsnyder - let me know if I should report it or you'll take care of it)
I went ahead and created a couple of issues for the problems @malinajirka pointed out, thanks again for bringing these up :) |
Fixes: wordpress-mobile/gutenberg-mobile#2446
Related PRs:
Description
This PR adds the functionality to the "Create Page" button
To test:
Layout Picker should show when creating a new page from My Site or Site Pages the Modal Layout Picker appears.
🗒️ The layouts that are provided right now do contain a lot of unsupported blocks. These will be filtered out by a later implementation.
From My Site
Expect to see the Editor loaded with the contents of your selected block
From Pages
Expect to see the Editor loaded with the contents of your selected block
Note: This PR includes some minor design fixes
Screenshots:
PR submission checklist:
RELEASE-NOTES.txt
if necessary.