-
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 domain picker to FSE #42951
Add domain picker to FSE #42951
Conversation
Caution: This PR affects files in the FSE Plugin on WordPress.com D44355-code has been created so you can easily test it on your sandbox. See this FieldGuide page about developing in the FSE Plugin for more info: PCYsg-ly5-p2 |
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~22 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. |
This PR is superseding #42834, right? |
Sadly I totally forgot about that one. Luckily, there is a little overlap at this point so I can steal Yan's work into mine :D |
aaef37b
to
99c36d5
Compare
"@wordpress/api-fetch": "*", | ||
"@wordpress/base-styles": "1.9.0", |
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.
Likely needs ^
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.
PRed #43058 since there seems to be NPM config problem.
a1561d8
to
bbfd0bf
Compare
99c36d5
to
ae4b50f
Compare
Depends on #43045.
Changes
The PR is the first step towards Domain Picker in FSE. Currently the domain picker:
What's left
Reading
_currentSiteId
) and Sites store to get the site title to initiate the domain search. Feels hacky.currentDomain
by processingsite.URL
. Feels hacky too and doesn't contain all the domain info (is free, relevance, category, etc..)Writing
When users set a domain (or a plan) we need to use
wpcom.cart
to store that information. There is a good example here. Something like this:What's unclear to me is whether this will add two domains to the cart or the backened will remove one of them automatically when you add a new domain product. This will need some investigation.
Also, I'm not sure how to access
wpcom
library in wp-admin, since I think it's part ofclient
folder.Testing
yarn start
to run Calypsoapps/full-site-editing
, runyarn dev --sync
to run the app and sync it with your sandbox.A8C_FSE_DOMAIN_PICKER_ENABLE
flag and set it to true in PHP.