Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The current site may not be displayed in the sidebar #23569

Open
crazytonyli opened this issue Sep 9, 2024 · 3 comments
Open

The current site may not be displayed in the sidebar #23569

crazytonyli opened this issue Sep 9, 2024 · 3 comments
Labels

Comments

@crazytonyli
Copy link
Contributor

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 crazytonyli added [Type] Bug iPad UI User interface bugs labels Sep 9, 2024
@dangermattic
Copy link
Collaborator

dangermattic commented Sep 9, 2024

Thanks for reporting! 👍

@kean
Copy link
Contributor

kean commented Sep 9, 2024

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
Copy link
Contributor

kean commented Sep 12, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants