-
Notifications
You must be signed in to change notification settings - Fork 2k
Search: i18nify the component #46825
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
Conversation
|
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~268 bytes added 📈 [gzipped]) DetailsCommon code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Sections (~168 bytes added 📈 [gzipped]) DetailsSections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. Async-loaded Components (~244 bytes added 📈 [gzipped]) DetailsReact 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. |
wp-desktop
left a comment
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.
WordPress Desktop CI Failure for job "wp-desktop-mac".
@saramarcondes please inspect this job's build steps for breaking changes at this link. For temporal failures, you may try to "Rerun Workflow from Failed".
Please also ensure this branch is rebased off latest Calypso.
tyxla
left a comment
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.
Hey @saramarcondes is this ready for review or are you still working on it?
| render() { | ||
| const searchValue = this.state.keyword; | ||
| const placeholder = this.props.placeholder || __( 'Search…' ); | ||
| const placeholder = this.props.placeholder || this.props.__( 'Search…', __i18n_text_domain__ ); |
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 was wondering why we need the textdomain argument now.
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 we need it in case the search component is used outside of the default context. And in this case we're receiving __ from withI18n so we need to still supply a context, right?
wp-desktop ci passing, closing review
tyxla
left a comment
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.
|
Maybe we need to add |
|
I'll try that but storybook worked before these changes, why should we need new dependencies based on these changes? 🤔 By the way, where did |
Not sure, perhaps another dependency or peer dependency that was updated needs those. Or we changed something with our TS config along the way. But the fact that storybook doesn't work for components package either means that it's not related to any of the component work done here.
I saw an error message that it's missing when I added |
|
I've tinkered with fixing storybook in #47098 |
e82f4f6 to
9168279
Compare
|
Is it possible this is something coming from the |
|
@tyxla yes. This is the same issue we ran into with the LanguagePicker which led me to delete the storybook sigh. |
Is this because |
|
I'm sure Gutenberg would be open to revisiting that decision especially as ES Modules mature (specifically in node). |
That makes sense, thanks for the context @sirreal 🙌
That would be an interesting avenue to explore, @saramarcondes. Alternatively, we could update |
|
@tyxla and @sirreal Thanks for the suggestions and information. I've opened a PR here (WordPress/gutenberg#26833) to convert |
9168279 to
b3fdb03
Compare
|
@tyxla Any chance you could re-review this? Thanks! |
tyxla
left a comment
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.
Looks good and works well 👍 (noting that I rebased it locally before testing)
59576cc to
e84df21
Compare



Changes proposed in this Pull Request
withI18nrather than usingwp/i18ndirectly. Aligns with how we're doing things in the LanguagePicker component.Testing instructions
/me/accountand ensure search still behaves as expected on desktop and mobileFixes #