Repository navigation
woop: uses combobox to navigate countries - #59876
Conversation
|
Link to Calypso live: https://calypso.live?image=registry.a8c.com/calypso/app:build-24455 |
|
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~11 bytes removed 📉 [gzipped]) DetailsCommon code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Sections (~1400 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 (~5857 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. |
3bf3221 to
c1b8fb3
Compare
There was a problem hiding this comment.
This component does not yet have types in the package definition for @wordpress/components which is causing your type errors. I've added them in DefinitelyTyped/DefinitelyTyped#58106. Once that merges and the calypso types are updated, this should pass the unit tests. The Calypso team can cause it to pass sooner if you ask!
There was a problem hiding this comment.
Thanks, we might do that. cc @p-jackson since we're midchat about this 😆
|
Some kind of encoding happening on the output: edit: this is coming from translations, french and variants seems to have a lot of these other languages seem to be ok. Lets ignore for now, not something we need to fix. @DustyReagan |
There was a problem hiding this comment.
I'm not sure why exactly, but TS believes get( WOOCOMMERCE_DEFAULT_COUNTRY ) can return a number, which causes a type error since the value prop must be a string. Do you believe this should be a string? If so, can you cast it to a String here?
There was a problem hiding this comment.
Is it stemming from this? as string should be fine here right? I don't think there is any cases where a non string can enter this setting.
There was a problem hiding this comment.
@retrofox is blog_public required in this hook? Can't see where/how it's used (still catching up after the break) - might be faster to just remove the def.
There was a problem hiding this comment.
@sirbrillig What's the best way to catch errors like these going forward? I wasn't seeing a type error there. 🤔
I cast it to a string here: ab4b8ac
Can't see where/how it's used (still catching up after the break) - might be faster to just remove the def.
@lsl I'm not seeing this either but it seems like get should be able to return different types, so I'm hesitant to limit it to strings.
There was a problem hiding this comment.
Good question! Sorry I didn't explain that earlier. You'd see the type errors if the types for ComboboxControl were available, but we're going to have to wait for the changes I merged there to be released and imported into calypso (and then rebased into this branch). Here's an example of when this was done recently: #59779
The reason I see them is that I manually added the types to my node_modules folder so I could check that they worked correctly, and that's why I was mentioning the errors to you here. This sort of thing is really weird and probably won't happen often.
There was a problem hiding this comment.
but we're going to have to wait for the changes I merged there to be released and imported into calypso (and then rebased into this branch)
Since it's not clear to me how long this process takes, you may want to ping the calypso team and ask them to mark these unit tests as passing (assuming the missing ComboboxControl is still the only new error). I'd do it but I don't have that power. 😅
There was a problem hiding this comment.
The reason I see them is that I manually added the types to my node_modules folder so I could check that they worked correctly, and that's why I was mentioning the errors to you here.
Ahhh! Got it, thanks!
Co-authored-by: Louis Laugesen <louis.laugesen@gmail.com>
475b3f9 to
fb04e8d
Compare
That button seems defunc'd and also causes the input to be a different height than the rest. Clicking outside of the input field will reset it.
Without this style the suggestions list will expand the width of the entire form. This will keep it at the width of the other input fields.
obenland
left a comment
There was a problem hiding this comment.
Looking good to me.
Should we wait until Automattic/jetpack#22248 made it to dotcom before merging it?
|
This should be good to go now. @Automattic/team-calypso could we ask you to mark the unit tests as passing, as suggested here? |

Changes proposed in this Pull Request
Testing instructions
http://calypso.localhost:3000/start/woocommerce-install/store-address?site=<siteId>woocommerce_default_countrybeing the code of the selected country.Related to #