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

Ribbon: Move to calypso-ui #35768

Merged
merged 5 commits into from
Sep 15, 2019
Merged

Ribbon: Move to calypso-ui #35768

merged 5 commits into from
Sep 15, 2019

Conversation

ockham
Copy link
Contributor

@ockham ockham commented Aug 26, 2019

This is a leaf component that doesn't have any counterpart in @wordpress/components. It might come in handy in Jetpack (to highlight paid Gutenberg blocks in the block picker).

Changes proposed in this Pull Request

Ribbon: Move to calypso-ui

Testing instructions

npm run distclean && npm ci
npm start

Verify that the ribbon still works:

@ockham ockham added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. Components labels Aug 26, 2019
@ockham ockham requested review from a team August 26, 2019 12:46
@ockham ockham self-assigned this Aug 26, 2019
@matticbot
Copy link
Contributor

Copy link
Member

@sirreal sirreal left a comment

Choose a reason for hiding this comment

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

I don't see this component rendered anywhere in /themes. In devdocs it seems to work fine.

There seems to be an issue fetching the README for devdocs. I suspect that's not new from this PR but it would be nice to fix for calypso-ui in general:

Before:

Screen Shot 2019-08-26 at 14 56 14

After:

Screen Shot 2019-08-26 at 14 56 11

@matticbot
Copy link
Contributor

matticbot commented Aug 26, 2019

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

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

name                   parsed_size           gzip_size
entry-main                  +771 B  (+0.0%)      +92 B  (+0.0%)
entry-domains-landing       +771 B  (+0.1%)      +92 B  (+0.1%)

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

Sections (~139 bytes removed 📉 [gzipped])

name    parsed_size           gzip_size
themes       -271 B  (-0.1%)      -51 B  (-0.0%)
theme        -271 B  (-0.1%)      -51 B  (-0.1%)
earn         -271 B  (-0.1%)      -37 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 (~821 bytes added 📈 [gzipped])

name                                     parsed_size           gzip_size
async-load-design-playground                 +1289 B  (+0.1%)     +471 B  (+0.1%)
async-load-design                            +1289 B  (+0.1%)     +455 B  (+0.1%)
async-load-design-blocks                      -273 B  (-0.0%)      -54 B  (-0.0%)
async-load-signup-steps-theme-selection       -271 B  (-0.7%)      -51 B  (-0.5%)

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.

@ockham
Copy link
Contributor Author

ockham commented Aug 27, 2019

I don't see this component rendered anywhere in /themes.

Ah, my bad. They had been there for about ~2 years to indicate certain classes of themes, e.g. 'Beginner'.

In devdocs it seems to work fine.

Yay!

There seems to be an issue fetching the README for devdocs. I suspect that's not new from this PR but it would be nice to fix for calypso-ui in general:
[...]

Ah, good spot. That's probably due to the way we import the respective components directly (from @automattic/calypso-ui/src/ribbon/docs/example). I'll look into that 👍


I just noticed that the devdocs example for Ribbon uses Card. That probably means I should move Card to calypso-ui first 😅

@ockham ockham added [Status] Blocked / Hold and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Aug 27, 2019
@ockham ockham force-pushed the move/ribbon-to-calypso-ui branch from 11e6ca4 to 2329e0e Compare September 14, 2019 22:43
Copy link
Member

@sirreal sirreal left a comment

Choose a reason for hiding this comment

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

Still seems to work fine 🚢

@ockham ockham merged commit 8310ae2 into master Sep 15, 2019
@ockham ockham deleted the move/ribbon-to-calypso-ui branch September 15, 2019 20:33
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