WordPress-iOS icon indicating copy to clipboard operation
WordPress-iOS copied to clipboard

The current site may not be displayed in the sidebar

Open crazytonyli opened this issue 1 year ago • 3 comments

Expected behavior

We display a maximal number of SidebarView.displayedSiteLimit sites on the sidebar. The sites on the sidebar contains (in priority order) the current site, other recently used sites, and the rest of the user's sites.

Actual behavior

The issue with current implementation is SidebarView.displayedSiteLimit is hard-coded as exactly the same as RecentSitesService.maxSiteCount.

The current site may not be displayed if we change SidebarView.displayedSiteLimit to be a smaller number.

Steps to reproduce the behavior

  1. Change SidebarView.displayedSiteLimit to be a number smaller than RecentSitesService.maxSiteCount.
  2. Make sure there are at least RecentSitesService.maxSiteCount sites in a WP.com account.
  3. Create a site named "Zoo" (any name that comes last in alphabetical order) in the WP.com account.
  4. Launch the Jetpack app and switch to a few different sites.
  5. Select the "Zoo" site.
  6. Open the sidebar, and check if "Zoo" is displayed in the sidebar.
Tested on [device], iOS [version], Jetpack iOS / WordPress iOS [version]

crazytonyli avatar Sep 09 '24 00:09 crazytonyli

Thanks for reporting! 👍

dangermattic avatar Sep 09 '24 00:09 dangermattic

That's a good point. I'd suggest changing RecentSitesService so that it doesn't artificially limited the number of most recent sites. It should be UI's job to determine how many to display.

kean avatar Sep 09 '24 13:09 kean

I'm changing the tag to "Tech Debt" since there is no defect at the moment.

kean avatar Sep 12 '24 17:09 kean