Skip to content

Latest Posts Block v1 Support in Mobile#1931

Merged
chipsnyder merged 23 commits intodevelopfrom
issue/1746-latest-post
Mar 11, 2020
Merged

Latest Posts Block v1 Support in Mobile#1931
chipsnyder merged 23 commits intodevelopfrom
issue/1746-latest-post

Conversation

@chipsnyder
Copy link
Copy Markdown
Contributor

@chipsnyder chipsnyder commented Feb 18, 2020

Fixes: #1746
Related PRs:

To Test

These tests were validated via WPiOS and WPAndroid
Categories make a network request to fetch the available categories, so they were tested against a Wordpress.com site as well as a self-hosted site.

Add New Block

  1. Select an existing Page or create a new one
  2. Add a Latest Posts Block

Expect: block to be added

  1. Tap on the block or the gear menu

Expect the settings to show
Validate the block is configured based on the settings in the table above

Modify Block

This should be tested by modifying in mobile and validating on the web and by modifying on the web and testing on mobile.

  1. Select a Latest Post Block and bring up the settings
  2. Modify Settings

Conditional items:

  • Tapping on the toggle for "Show Post Content" should add a row for "Show" with the options of "Excerpt" or "Full Post" depending on the configuration of the block.
  • Changing "Show" to "Full Post" should hide "Max number of words in excerpt"
  • Changing "Show" to "Excerpt" should show "Max number of words in excerpt" with the last selected value
  1. Close the settings
  2. Save as a draft or publish
  3. Leave the screen

Validate by checking the page on the other platform and by going into the same page/post that all settings match how you configured them.

Categories known behaviors

Categories are fetched in componentDidMount which results in a flow where multiple Latest-Posts Blocks can show different data.

  1. Open a page
  2. Add a Latest-Post Block
    - Take Note of the Categories -
  3. Modify the available categories. If on the web, do this in a new tab.
    - Note the first block does not reflect the changes in the categories -
  4. Add a new Latest-Post Block
    - Note the second block does reflect the changes in the categories -

This behavior is consistent on the web and mobile. Leaving the page and coming back will sync the categories.

Screenshots

latestPost

PR submission checklist:

  • I have considered adding unit tests where possible.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@chipsnyder chipsnyder added [Type] Enhancement Improves a current area of the editor [Status] Needs Design Review Needs design review or sign-off before shipping labels Feb 18, 2020
@chipsnyder chipsnyder changed the title Latest Posts Block v1 Support in Mobile [In Progress] Latest Posts Block v1 Support in Mobile Feb 18, 2020
@chipsnyder chipsnyder force-pushed the issue/1746-latest-post branch from 2eb611c to 9f531c6 Compare February 20, 2020 18:21
@chipsnyder chipsnyder added this to the 1.24 milestone Feb 20, 2020
@chipsnyder chipsnyder linked an issue Feb 20, 2020 that may be closed by this pull request
@chipsnyder chipsnyder changed the title [In Progress] Latest Posts Block v1 Support in Mobile Latest Posts Block v1 Support in Mobile Feb 20, 2020
@chipsnyder chipsnyder requested review from geriux and mkevins February 20, 2020 19:05
@chipsnyder chipsnyder force-pushed the issue/1746-latest-post branch from c359074 to ec0771c Compare February 20, 2020 21:44
@iamthomasbishop
Copy link
Copy Markdown
Contributor

@chipsnyder Great work thus far! Per our discussion in Slack on Friday, I have some feedback. I see you've already made some changes and I've pulled down the latest build and I'll update my notes as a result 😄 I have only tested in iOS thus far, but I am assuming most of these issues also exist on Android. So I will give Android a good review on Monday.

Relevant Issues

  • After seeing the Post Content Settings part in action again, it feels a little backwards to me to toggle off an action to show a conditional cell below it. So would it make more sense to change the second toggle to be Only show excerpt or similar? (example: https://cloudup.com/cdJj9w-cE-C). It might also help to put a footnote below it that explains what's going on. If the default actually is excerpt, then we can flip this (toggle on by default, and footnote might not be as relevant as a result).

  • In dark mode, the Customize button text color should be the same as the main link color in dark mode ($blue-30)

  • Separators should extend to the 16px keylines (example: https://cloudup.com/cIuFHpgqcFd)

  • We can remove the last separator in each table section (see previous example)

  • I think Excerpt length might be more succinct as a label instead of Max number of words in excerpt, but it's a very minor thing

Unrelated issues

  • After interacting with an input sometimes you can't scroll back upward on the bottom sheet

@chipsnyder
Copy link
Copy Markdown
Contributor Author

chipsnyder commented Feb 24, 2020

So would it make more sense to change the second toggle to be Only show excerpt or similar? (example: https://cloudup.com/cdJj9w-cE-C). It might also help to put a footnote below it that explains what's going on. If the default actually is excerpt, then we can flip this (toggle on by default, and footnote might not be as relevant as a result).

The default is excerpt so changing that toggle as you suggest is good with me.

In dark mode, the Customize button text color should be the same as the main link color in dark mode ($blue-30)

👍

Separators should extend to the 16px keylines (example: https://cloudup.com/cIuFHpgqcFd)
We can remove the last separator in each table section (see previous example)

Oops, those changes must not have made it in the build I'll double-check that they're included.

I think Excerpt length might be more succinct as a label instead of Max number of words in excerpt, but it's a very minor thing

Yeah, I wasn't the biggest fan of the original wording either.

These should all be straight forward changes. I'll get something together for you later today. Thanks for taking a look at the updated tweaks :)

@iamthomasbishop
Copy link
Copy Markdown
Contributor

Oops, those changes must not have made it in the build I'll double-check that they're included.

I just deleted and re-installed the test build and I'm seeing them now — not sure if this is an updated build or I just missed them in my second review All good now! 😄

These should all be straight forward changes. I'll get something together for you later today. Thanks for taking a look at the updated tweaks :)

Awesome, thank you! 🙏

@chipsnyder chipsnyder force-pushed the issue/1746-latest-post branch from 2653b89 to 3032629 Compare February 24, 2020 22:51
@chipsnyder chipsnyder removed the [Status] Needs Design Review Needs design review or sign-off before shipping label Feb 28, 2020
Copy link
Copy Markdown
Contributor

@geriux geriux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Enhancement Improves a current area of the editor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Latest Posts block - 1st iteration

3 participants