wordpress-mobile / wordpress-mobile/WordPress-Android

Posts/Pages List: search results are not cleared when "X" is tapped after rotating the device

Open
#12,561 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Expected behavior

Clicking on the Clear Button (X) during a configuration change (like a rotation) should clear the search query and the displayed results. Also, the overall screen state should not become inconsistent with what the user expects when rotating the screen.

Actual behavior

When searching for Site Pages or Blog Posts using a specific search query (say tags) everything works as expected. All pages or posts that match that search query are shown, as expected. Then, when clicking the Clear Button (X), the search query and results gets cleared. However, if the screen gets rotated first (a configuration change) and then the Clear Button (X) gets clicked then, the search query gets cleared but not the search results. Afterwards, rotating back to the original orientation, the state of the screen gets rurther messed up.

Steps to reproduce the behavior
  1. Open My Site
  2. Choose a site
  3. Navigate to Site Pages or Blog Posts
  4. Search for something that will produce a set of results, for example search for tags
  5. Click the Close Button (X) on the top right
  6. Observe that the search query and results gets cleared
  7. Search again for tags
  8. This time rotate the screen before clicking on the `Close Button (X)
  9. Observer that the search query and results are visible (as expected)
  10. Now click the Close Button (X) once more
  11. Observer that the search query gets cleared but not the search results
  12. Rotate the screen back to the initial orientation
  13. Observer that the search query reappears and clicking the Close Button (X) produces the same set of problems
Tested on [device], Android [version], WPAndroid [version]

Tested on Pixel 2 XL, Android 10, WPAndroid 15.4-rc-1

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

No file, test, or code entry point is named in the issue. Reproduce the search-and-clear flow in Site Pages or Blog Posts on Pixel 2 XL or an equivalent Android setup, including rotations; done means clearing the query also clears results and the screen state remains consistent after rotating back.

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.