wordpress-mobile / wordpress-mobile/WordPress-Android

Site Picker screen duplicated instance in back stack

Open
#17,771 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

[Pri] Low [Type] Bug Site Management
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

  1. Log in to either WPAndroid or JPAndroid with an account with 1 site
  2. Open the site picker (arrow to the right of the currently selected site name on app Home)
  3. Add at least 2 self-hosted sites (+ button on the top right corner, and follow the "add self-hosted" flow
  4. Select any site
  5. Open the site picker again
  6. Verify the Site Picker screen is displayed
  7. Long press a self-hosted site
  8. Verify the remove site confirmation dialog is shown
  9. Confirm the site removal
  10. Verify a new instance of the Site Picker screen is displayed
  11. Hit back on the device or the X close button on the top left
  12. 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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.