-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Increase items per page on A4A Development sites page. #94734
Increase items per page on A4A Development sites page. #94734
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
This PR modifies the release build for the following Calypso Apps: For info about this notification, see here: PCYsg-OT6-p2
To test WordPress.com changes, run |
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~20 bytes added 📈 [gzipped])
Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change looks good and works as expected. 👌🏼🙂
I left just one minor idea on how we could adjust the comment.
client/a8c-for-agencies/sections/sites/sites-dashboard/index.tsx
Outdated
Show resolved
Hide resolved
Co-authored-by: Ivan Ottinger <[email protected]>
Based on the issue definition we should apply the same fetch logic for:
But I believe the request for development sites is the only one facing the issue. @andregardi , that is also why you implemented the "quick" fix for dev sites only, right? |
…avorites sites on Development page.
Closes https://github.com/Automattic/dotcom-forge/issues/9193
Proposed Changes
On A4A sites dashboard we list 50 sites per page, that are requested by the
/wpcom/v2/jetpack-agency/sites
API. It uses Elastic Search under the hood.When filtering for Development sites, the server does not fetch the 50 development sites, but rather fetch the first 50 sites and within that array it filters the result to include only development sites.
If the agency has less than 50 sites, user will never miss any development site on the list.
But if the agency has 51 sites or more and created a new development site, the first page of
https://agencies.automattic.com/sites?is_development
will not include the new development site.As a temporary fix, we are increasing the items per page for development sites to 100.
We are planning to work on a better fix on server side, but could not found a good solution yet.
Testing Instructions
Pull this branch to your local environment.
If you agency already has 50 sites, you can easily test by creating a new development site and check that it appears on http://agencies.localhost:3000/sites?is_development
If you don't have so many sites, you can still test it by reducing the default per page constant for the overall dashboard.
client/a8c-for-agencies/components/items-dashboard/constants.ts
reduce theperPage
from 50 to 1.Pre-merge Checklist