wordpress-mobile / wordpress-mobile/WordPress-Android
Set Parent from Pages screen also publishes all Local Changes
Nobody has claimed this yet.
- 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:
- Update ONLY the parent page setting. (which looks a bit more challenging to implement)
- Show a confirmation dialog to the user saying all pending local changes will also be saved and updated.
- 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
- Open the WordPress Android app and log into an account that has at least 2 top-level pages
- In the Home screen, make sure you are on the My Site > Menu page
- Tap on the "Pages" option
- In the Pages screen, tap on any page to go to the editor
- In the Editor, make any changes
- Hit back to save the changes locally
- Check that the page, in the Pages screen, shows a label saying there are "Local Changes"
- Hit back one more time to go to the home screen
- Tap your site URL to see it's current "published" version
- Go to the page where you made the changes
- Verify that the changes ARE NOT there (since they are only local)
- Hit back again to go to the home screen
- Make sure you are on the My Site > Menu page
- Tap on the "Pages" option
- In the Pages screen, tap on overflow menu ("⋮", three vertical dots) for the page that has local changes
- Tap on the "Set parent" option
- Select a new parent page
- Tap on Save, on the top bar
- Check that the page was saved and "Local Changes" label is not there anymore
- Check that a snackbar saying "Page updated" is shown
- Repeat steps 7-9
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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