-
Notifications
You must be signed in to change notification settings - Fork 2k
Stats-30 - Ensure correct logo and titles are displayed in the new header #102833
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
base: trunk
Are you sure you want to change the base?
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
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.
Pull Request Overview
This PR updates the header for the Stats view to ensure the correct logo and titles are displayed, addressing branding differences based on the environment. Key changes include:
- Updating the icon import and adding the 'settings' icon for the right section in the header.
- Introducing a conditional logo display using the new JetpackLogo component based on the isOdysseyStats flag.
- Modifying the NavigationHeader component to accept new props (titleLogo and rightSection) to support the updated header design.
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
File | Description |
---|---|
client/my-sites/stats/site.jsx | Adjusts header rendering to conditionally display a logo and icon. |
client/components/navigation-header/navigation-header.tsx | Updates the NavigationHeader API to support titleLogo and rightSection. |
Files not reviewed (1)
- client/components/navigation-header/navigation-header.scss: Language not supported
Comments suppressed due to low confidence (2)
client/my-sites/stats/site.jsx:537
- [nitpick] Ensure that the constants STATS_PRODUCT_NAME and STATS_PRODUCT_NAME_IMPR correctly reflect the intended branding in each environment. It might be helpful to review their naming and definitions across the codebase for consistency.
title={ isOdysseyStats ? STATS_PRODUCT_NAME : STATS_PRODUCT_NAME_IMPR }
client/components/navigation-header/navigation-header.tsx:75
- [nitpick] The use of both 'calypso-navigation-header' and 'navigation-header' as CSS classes may be redundant. Consider consolidating or clearly documenting the intent of each class to avoid confusion or conflicting styles.
className={ clsx( 'calypso-navigation-header', 'navigation-header', className, {
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~280 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. |
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 |
'calypso-navigation-header__screen-options-tab': hasScreenOptionsTab, | ||
} ) } | ||
{ ...rest } | ||
> | ||
<div className="calypso-navigation-header__head">{ headElement }</div> | ||
<div className="calypso-navigation-header__body"> | ||
<div className="calypso-navigation-header__left-section">{ titleElement }</div> | ||
<div className="calypso-navigation-header__right-section">{ children }</div> | ||
{ rightSection && ( |
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.
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 rightSection
still takes in the whole component as to what is to be displayed in that section. IMO, the wrapper for the right section is required in the component itself, as it acts as a slot and places the content in the correct location. Let me know your thoughts.
Related to STATS-30
Proposed Changes
Why are these changes being made?
Testing Instructions
Pre-merge Checklist