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

A4A: Show placeholder when team member list is fetching. #94139

Merged
merged 3 commits into from
Sep 4, 2024

Conversation

jkguidaven
Copy link
Contributor

@jkguidaven jkguidaven commented Sep 3, 2024

The primary objective of this pull request is to display a placeholder while we are retrieving the member list. As it has become a common pattern to show a page placeholder, I have decided to create a reusable one that can be used as a generic loader.

Screen.Recording.2024-09-03.at.7.20.16.PM.mov

Closes https://github.com/Automattic/automattic-for-agencies-dev/issues/1022

Proposed Changes

  • The first step was to create a reusable page placeholder. We already have a good placeholder on the landing page, and using the same design for the rest of the page makes sense. This PR extracts those presentations into a reusable component (PagePlaceholder) so we can reuse it on other pages.
  • We've also updated the landing page to now use the reusable page placeholder along with the team section pages.

Why are these changes being made?

  • There is a tendency for the team member list page to flicker due to premature rendering, which makes the UI experience unpolished. For that, we can show a placeholder while we fetch the list.

Testing Instructions

  • Use the A4A live link and go to the /team page.
  • Confirm you can see the placeholder when the page does the initial fetch.

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@jkguidaven jkguidaven self-assigned this Sep 3, 2024
@matticbot
Copy link
Contributor

matticbot commented Sep 3, 2024

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

Sections (~122 bytes added 📈 [gzipped])

name                      parsed_size           gzip_size
a8c-for-agencies-team          +752 B  (+0.2%)     +106 B  (+0.1%)
a8c-for-agencies-landing       +422 B  (+0.4%)      +16 B  (+0.1%)

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.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

@jkguidaven jkguidaven requested a review from a team September 3, 2024 11:22
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Sep 3, 2024
@jkguidaven jkguidaven marked this pull request as ready for review September 3, 2024 11:22
Copy link
Contributor

@yashwin yashwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Thanks for creating a reusable page-loading component!

@jkguidaven jkguidaven force-pushed the add/a4a/team-member-list-placeholder branch from 227dd14 to 61ff537 Compare September 4, 2024 07:47
@matticbot
Copy link
Contributor

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • notifications
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug add/a4a/team-member-list-placeholder on your sandbox.

@jkguidaven jkguidaven merged commit 4b4c0f9 into trunk Sep 4, 2024
11 checks passed
@jkguidaven jkguidaven deleted the add/a4a/team-member-list-placeholder branch September 4, 2024 08:21
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants