Skip to content
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

Set Parent from Pages screen also publishes all Local Changes #17417

Open
thomashorta opened this issue Nov 3, 2022 · 0 comments
Open

Set Parent from Pages screen also publishes all Local Changes #17417

thomashorta opened this issue Nov 3, 2022 · 0 comments

Comments

@thomashorta
Copy link
Contributor

thomashorta commented Nov 3, 2022

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
bug_set_parent_push_changes_small.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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants