-
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
Masterbar: Add a label for the Reader icon. #98479
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: App Entrypoints (~18 bytes added 📈 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. 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. |
@spsiddarthan on mobile, I'm seeing the label: It should be hidden here. I think you can resolve this be adding the
|
Thanks, @davemart-in, I am on it. |
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.
LGTM. Feel free to merge it whenever. Thanks!
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.
I'm requesting changes because I think the <Item/>
component can take the label as its child. Something like
<Item
...
icon={...}
>
<span class="masterbar__icon-label masterbar__item-content">
{ translate( 'Reader' ) }
</span>
</Item>
I might be missing something but it looks like that will be a better place for the label and the icon
prop can be used for just the icon.
The desired result looks great but I think this should help keep the code a little tidier.
Thank you, @holdercp, that's much cleaner, indeed. I have made the changes and tested it. I am happy to merge this when I start my day tomorrow, but feel to free to merge it if it's working well for you as well. |
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.
Looks great!
@@ -487,7 +487,11 @@ class MasterbarLoggedIn extends Component { | |||
tooltip={ translate( 'Read the blogs and topics you follow' ) } | |||
preloadSection={ this.preloadReader } | |||
hasGlobalBorderStyle | |||
/> | |||
> | |||
<span class="masterbar__icon-label masterbar__item-reader-label"> |
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.
@holdercp 👋 Flagging the incorrect use of the class
prop — in React, the className
property should be used instead. This is also causing an error in the browser console: Warning: Invalid DOM property 'class'.
, which looks like it got missed during the PR review.
I'm going to address this as part of #98510, I'm going to add the folks who worked on this PR as reviewers. Thank you in advance!
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.
@ciampo Ah, totally slipped by me. Thank you!
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.
Thank you for catching that @ciampo - I totally missed it, I see the PR is in draft, I am happy to make a different PR as well to fix the warning in a few hours
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.
Related to pe7F0s-2rg-p2
Proposed Changes
Why are these changes being made?
Testing Instructions
Before
After
Pre-merge Checklist