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

Reader: Convert SiteStream to functional component and add sidebar #78818

Merged
merged 3 commits into from
Jun 30, 2023

Conversation

creativecoder
Copy link
Contributor

Proposed Changes

  • Converts SiteStream to a functional component
  • Adds sidebar with post count, follower count, and most used post tags
  • Moves common components and functions for access by both FeedStream and SiteStream

This PR replicates the changes from #78702 and #78706 done for the FeedStream component.

Testing Instructions

  • Visit /reads/blogs/{blog-id} to see the sidebar added.
Before After
image image

@creativecoder creativecoder added the [Feature] Reader The reader site on Calypso. label Jun 30, 2023
@creativecoder creativecoder requested a review from a team June 30, 2023 01:54
@creativecoder creativecoder self-assigned this Jun 30, 2023
@creativecoder creativecoder requested a review from a team as a code owner June 30, 2023 01:54
@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 Jun 30, 2023
@github-actions
Copy link

github-actions bot commented Jun 30, 2023

@creativecoder creativecoder changed the title Reader: convert to functional and add sidebar to SiteStream Reader: Convert SiteStream to functional component and add sidebar Jun 30, 2023
@matticbot
Copy link
Contributor

matticbot commented Jun 30, 2023

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

App Entrypoints (~35 bytes added 📈 [gzipped])

name                   parsed_size           gzip_size
entry-stepper               +145 B  (+0.0%)      +34 B  (+0.0%)
entry-main                  +145 B  (+0.0%)      +39 B  (+0.0%)
entry-login                 +145 B  (+0.0%)      +38 B  (+0.0%)
entry-subscriptions         +126 B  (+0.0%)      +34 B  (+0.0%)
entry-domains-landing       +126 B  (+0.0%)      +34 B  (+0.0%)
entry-browsehappy           +126 B  (+0.1%)      +34 B  (+0.1%)

Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used.

Sections (~305 bytes added 📈 [gzipped])

name                  parsed_size           gzip_size
reader                    +1077 B  (+0.1%)     +305 B  (+0.1%)
write-flow                 +605 B  (+0.1%)     +193 B  (+0.1%)
videopress-flow            +605 B  (+0.1%)     +193 B  (+0.1%)
link-in-bio-tld-flow       +605 B  (+0.1%)     +193 B  (+0.1%)
free-flow                  +605 B  (+0.1%)     +193 B  (+0.1%)
build-flow                 +605 B  (+0.1%)     +193 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.

Async-loaded Components (~2058 bytes removed 📉 [gzipped])

name                                                 parsed_size            gzip_size
async-load-calypso-reader-site-stream                    +4418 B  (+31.1%)    +1796 B  (+40.1%)
async-load-design-blocks                                  +831 B   (+0.0%)     +267 B   (+0.0%)
async-load-calypso-reader-feed-stream                     +736 B   (+4.0%)     +766 B  (+13.6%)
async-load-calypso-components-web-preview-component       +605 B   (+0.1%)     +193 B   (+0.1%)

React components that are loaded lazily, when a certain part of UI is displayed for the first time.

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.

Copy link
Contributor

@davemart-in davemart-in left a comment

Choose a reason for hiding this comment

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

Looking good! Nicely done.

@creativecoder
Copy link
Contributor Author

Note that I'm going to merge in #78853 to this branch, to remove the need for an additional deploy.

@creativecoder creativecoder merged commit 2ab46b7 into trunk Jun 30, 2023
@creativecoder creativecoder deleted the update/reader-site-stream-functional-component branch June 30, 2023 19:40
@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 Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Reader The reader site on Calypso.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants