-
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
Add site setting to hide the Action Bar #98318
base: trunk
Are you sure you want to change the base?
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 (~7 bytes added 📈 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Sections (~231 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. Async-loaded Components (~18 bytes added 📈 [gzipped])
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. Generated by performance advisor bot at iscalypsofastyet.com. |
3cf3d66
to
6ed16c3
Compare
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.
This looks great, thank you for working on it @ntsekouras 🙌
Left some suggestions, let me know what you think.
@@ -2,6 +2,7 @@ import { isEnabled } from '@automattic/calypso-config'; | |||
import { Card, Button, FormLabel, Gridicon } from '@automattic/components'; | |||
import { guessTimezone, localizeUrl } from '@automattic/i18n-utils'; | |||
import languages from '@automattic/languages'; | |||
import { ToggleControl } from '@wordpress/components'; |
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.
Nice to be able to use @wordpress/components
directly!
@@ -413,6 +439,7 @@ export class SiteSettingsFormGeneral extends Component { | |||
{ this.blogAddress() } | |||
{ this.languageOptions() } | |||
{ this.Timezone() } | |||
{ ! siteIsJetpack && this.hideActionbar() } |
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.
We're intentionally adding this one just for WP.com simple sites, right?
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 think so yes, since Action Bar is not available to atomic sites. Am I missing something?
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 think so yes, since Action Bar is not available to atomic sites.
Right. Atomic sites are also Jetpack sites.
Am I missing something?
I don't think you're missing anything. I'm mostly making sure the intent is clearly communicated between the author, reviewer, and everyone else reading this later (including our future selves).
/> | ||
<FormSettingExplanation> | ||
<a href="https://en.support.wordpress.com/action-bar/"> | ||
{ translate( 'Learn more about the Action Bar.' ) } |
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.
Similarly, check how this privacy link opens the help center. It would be nice if this one can do the same.
See a comparison of the behavior of those two links in this video:
Screen.Recording.2025-01-16.at.17.02.52.mov
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 made the suggested change but I'm not sure how to test it successfully. I tried different locales but it's very possible the specific page has no translations yet (or at least the languages I tried)? 🤔
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 just checked, and you're right: that page has never been translated into other languages.
cc @Automattic/i18n and @dlind1 - do we want to translate it, or is it intentionally left out?
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.
That wasn't intentional, but also not an oversight since not every page is automatically being translated :)
I've added it to the queue and it should be sent for translation on Monday the 20th.
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.
Perfect, thanks @dlind1!
5798578
to
7a9a8da
Compare
Related to #53830
This PR adds a new general setting (wpcom_hide_action_bar) to conditionally show the Action Bar on the front end of a site. The default value will be falsy to preserve the current behavior that Action Bar is shown.
The main issue will need 1 more PRs to be complete that I'll create and link shortly:
Notes
Testing Instructions
You need to test this PR with the other linked PRs.
Pre-merge Checklist