wordpress-mobile / wordpress-mobile/WordPress-Android

Set Parent from Pages screen also publishes all Local Changes

Open
#17,417 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

[Pri] Medium [Type] Bug Posting/Editing Posts + Pages
Dominant language
Kotlin
Stars
3.2k
Forks
1.4k
Avg merge
1d 11h
Merged PRs (30d)
69

Description

This possible issue / improvement opportunity was found while I was implementing PR #17329, and was mentioned briefly on that PR description and comments.

Basically: when the parent of a page with local changes (in content for example) is changed using the "Set Parent" option from the Pages screen, then the local changes are also published, and not just the parent page setting.

Expected behavior

I am not 100% sure of what I would expect in this scenario, but I have a few ideas:

  1. Update ONLY the parent page setting. (which looks a bit more challenging to implement)
  2. Show a confirmation dialog to the user saying all pending local changes will also be saved and updated.
  3. Disable / remove that "Set Parent" option from that page item overflow menu when there are local changes to it.
Actual behavior

No information is shown about updating all local changes, and it just updates everything that changed + the parent page, so when I go to the actual published page, I notice the local changes I made to other settings / content were also updated.

Video with the steps and current behavior

https://user-images.githubusercontent.com/5091503/199750780-e26bbdba-e445-4c56-b9fd-8da77f7f4a8b.mp4

Steps to reproduce the behavior
  1. Open the WordPress Android app and log into an account that has at least 2 top-level pages
  2. In the Home screen, make sure you are on the My Site > Menu page
  3. Tap on the "Pages" option
  4. In the Pages screen, tap on any page to go to the editor
  5. In the Editor, make any changes
  6. Hit back to save the changes locally
  7. Check that the page, in the Pages screen, shows a label saying there are "Local Changes"
  8. Hit back one more time to go to the home screen
  9. Tap your site URL to see it's current "published" version
  10. Go to the page where you made the changes
  11. Verify that the changes ARE NOT there (since they are only local)
  12. Hit back again to go to the home screen
  13. Make sure you are on the My Site > Menu page
  14. Tap on the "Pages" option
  15. In the Pages screen, tap on overflow menu ("⋮", three vertical dots) for the page that has local changes
  16. Tap on the "Set parent" option
  17. Select a new parent page
  18. Tap on Save, on the top bar
  19. Check that the page was saved and "Local Changes" label is not there anymore
  20. Check that a snackbar saying "Page updated" is shown
  21. Repeat steps 7-9
  22. Verify that the previous local changes ARE there now
Tested on Samsung S21+, Android 12, WPAndroid 21.0-rc01
Also tested on the Android emulator, Android 12, during development of #17329, not sure what WPAndroid version but < 21

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Pages screen flow: create local changes, choose Set parent from the page overflow menu, and save the new parent. Trace which operation publishes the pending changes and review the expected-behavior options with maintainers; done should prevent unintended publication or clearly warn the user before all local changes are saved.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.