wordpress-mobile / wordpress-mobile/WordPress-Android
Site Picker screen duplicated instance in back stack
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 3.2k
- Forks
- 1.4k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 69
Description
Internal reference: p5T066-3NG-p2#comment-14207
Going to the “Choose site” and removing 1 self-hosted site from there makes another instance of the same screen open again on top of the current one, so the user needs to go back / close it twice in order to reach the app Home.
I don’t know exactly what the conditions need to be, but in my case, the issue happened when I was logged in with a WordPress.com account with 1 site and had other 2 self-hosted sites added and then removed 1 self-hosted site. BUT it didn't happen when I had the same WP.com account (1 site) + only 1 self-hosted site added and removed that self-hosted site.
Video showing the bug (1 WP.com site + 2 self-hosted):
https://user-images.githubusercontent.com/5091503/212910273-bf676b32-4a6b-42a6-9402-8069cc5baaf2.mp4
Video showing basically the same steps but working correctly (1 WP.com site + 1 self-hosted):
https://user-images.githubusercontent.com/5091503/212910786-f890e9d9-69a3-4f11-86b0-8d24033aee38.mp4
Expected behavior
After removing the site, the current Site Picker screen should be updated.
Actual behavior
After removing the site, a new Site Picker screen is shown on top of the current one and both are updated.
Steps to reproduce the behavior
Requirements: log in to either WPAndroid or JPAndroid with an account with 1 site, add (at least?) 2 self-hosted sites in the Site Picker
- Log in to either WPAndroid or JPAndroid with an account with 1 site
- Open the site picker (arrow to the right of the currently selected site name on app Home)
- Add at least 2 self-hosted sites (+ button on the top right corner, and follow the "add self-hosted" flow
- Select any site
- Open the site picker again
- Verify the Site Picker screen is displayed
- Long press a self-hosted site
- Verify the remove site confirmation dialog is shown
- Confirm the site removal
- Verify a new instance of the Site Picker screen is displayed
- Hit back on the device or the X close button on the top left
- Notice the screen was closed but there is another Site Picker screen being displayed
Tested on Samsung Galaxy S21+, Android 13, WPAndroid 21.5-rc-1
Tested on Samsung Galaxy S21+, Android 13, JPAndroid 21.5-rc-1
Tested on Samsung Galaxy S21+, Android 13, JPAndroid 21.4
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 removal flow in the Site Picker on WPAndroid or JPAndroid using the listed account and site setup, then trace the navigation and site-removal handling. Done means removing a self-hosted site updates the current picker without adding another instance, and the Home screen is reached after one back or close action.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100