-
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
[Reader] Add support to Prompt block #18323
Merged
Merged
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
Reuse an existing color from `mResourceVars` since it is the one that most closely resembles the --color-neutral-5 used on web (gray-5).
📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
|
RenanLukas
approved these changes
Apr 26, 2023
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 for the changes, @thomashorta. It's working as expected.
I've left a suggestion for a unit test and I'm approving it.
LGTM
WordPress/src/main/java/org/wordpress/android/ui/reader/utils/ReaderUtils.java
Show resolved
Hide resolved
thomashorta
force-pushed
the
fix/reader-prompt-block
branch
from
April 26, 2023 21:20
c50251b
to
95047a7
Compare
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.
The "Prompt Block" is shown in posts made on the web as an answer to the Daily Prompts. The Loop team just implemented the CSS for it to work properly both on the web and on the mobile apps but a few minor issues still needed to be resolved on the app side:
--color-neutral-5
CSS variable to the Reader Renderer (even though we are not currently using it)margin-right
to the body of the content because Android's Webview has a bug that cuts off 1 pixel from the righttag
URLs inside the post to show them inside the app readerThe WebView 1-pixel issue
To test
Prompt Block UI
It seems the calypso CSS changes have been deployed, so it's possible to test the block UI.
My Site > Home
Tag URL interception
My Site > Home
topic
page is openedDemo
Demo of the CSS fix by using the proxy to also change the provided CSS to use
--color-neutral-5
in the block border, just to test that change as well (using Map Local in Charles Proxy).redaer-prompt-block-Android.mp4
Regression Notes
Potential unintended areas of impact
Content being shifted because of the border. Wrong links being intercepted.
What I did to test those areas of impact (or what existing automated tests I relied on)
Manual tests.
What automated tests I added (or what prevented me from doing so)
Unit tests for the ViewModel.
PR submission checklist:
RELEASE-NOTES.txt
if necessary.UI Changes testing checklist:
Note: most changes here only affect the content inside a Webview so some of the items above do not apply.