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
Update @wordpress and React packages [MAILPOET-5102] #4786
Conversation
Pull reviewers statsStats of the last 90 days for mailpoet:
|
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.
Great job! 👏
I added a few small notes. I can verify these myself, given that you'll be AFK, @costasovo.
Thanks!
@@ -38,7 +38,7 @@ export function OptionButton({ | |||
</Button> | |||
{slots.length > 0 && | |||
slots.map(({ key, slot }) => ( | |||
<Fragment key={`slot-${key}`}>{slot}</Fragment> | |||
<Fragment key={`slot-${key}`}>{slot()}</Fragment> |
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.
Oh, did this work before? I also wonder if there's a difference between {slot()}
and <Slot>
...
}} | ||
position="bottom center" |
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.
More of a note to self to check if the dropdown positioning in the UI somehow changed.
["@babel/preset-react", { "runtime": "automatic" }], | ||
"@babel/preset-env" | ||
"@babel/preset-env", | ||
["@babel/preset-typescript", { "allowDeclareFields": true }] |
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 wonder whether we should review the preset order in any other config (for any reason)...
import { DefaultSidebar } from './default_sidebar'; | ||
import { PlacementSettingsSidebar } from './placement_settings_sidebar'; | ||
import { store } from '../../store'; | ||
|
||
// workaround for block editor store useSelect |
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.
Was this later removed (moved to types/...
as per 5638e31)? Need to check.
@@ -8,6 +12,14 @@ import { BlockSettings } from './block_settings.jsx'; | |||
import { SidebarHeader } from './sidebar_header'; | |||
import { store } from '../../store'; | |||
|
|||
// workaround for block editor store useSelect |
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.
Was this later removed (moved to types/...
as per 5638e31)? Need to check.
050571d
to
a533f18
Compare
Thanks, @Aschepikov! Great catches 👏
This is strange, I can't replicate it. Tried both with the premium plugin enabled and disabled. Did you have the correct premium plugin JS (caches and stuff) when you were testing that? I don't know how to reproduce it. On your screenshot, I don't see the "all of", "any of" switch, so I'd guess the premium plugin is not active, or the JS is not working. Should I check it on your website ❓ Issues:
Trying to play with the tags, but can't reproduce this. Do you have any steps to reproduce? Or should I check it on your website❓
Indeed, it seems that Gutenberg doesn't create the blur anymore. That's fine, we'll follow whatever they do ✅
That was a bug in Gutenberg components, now it's fixed, which is desired (enabled left image, disabled right image) ✅
That seems to be the Gutenberg style for labels in the sidebar. We can see it in the post editor itself, as well as in the individual components, such as InputControl ✅
Good catch, this seems to differ from Gutenberg. I need to investigate 🐞
That looks like a bug 🐞
Also a bug 🐞
That seems to be a style of the underlying Gutenberg component ✅
This seems to work exactly as in the WP post editor for me, so I'd say it's OK ✅
Same here, looks like WP post editor, so I think OK ✅
We could fix this, but isn't the new UI actually better? It's probably more translation-friendly as well (more space). I'd keep it on two lines ✅ |
@JanJakes For the first error you can check it here https://alex.qawp.net/wp-admin/admin.php?page=mailpoet-segments#/new-segment |
@Aschepikov I fixed 5, 6, 7, and also 11, and another small issue.
Headers in the panels are not uppercased. It's only labels that are uppercased. Just need to check the first issue and all else should be fine. |
@Aschepikov I also likely fixed number 1 — improved the code to avoid any race conditions or duplicates. I also found a new issue (that the first time the "add tag" select was focused, it showed no autocomplete) and fixed it too. |
Most of the WordPress packages already upgraded to react 18 and use new hooks so we need to upgrade also the react libs. [MAILPOET-5102]
[MAILPOET-5102]
This commit fixes CSS which was preventing clicking the custom font select component and suppresses a deprecation warning by adding __nextUnconstrainedWidth property. [MAILPOET-5102]
[MAILPOET-5102]
[MAILPOET-5102]
After the updates some packages that we use in zip build don't work with node17. This commit updates dev env to the most recent node version. [MAILPOET-5102]
[MAILPOET-5102]
[MAILPOET-5102]
[MAILPOET-5102]
[MAILPOET-5102]
Both store name and store descriptor typings should work in all cases. [MAILPOET-5102]
[MAILPOET-5102]
[MAILPOET-5102]
[MAILPOET-5102]
[MAILPOET-5102]
[MAILPOET-5102]
[MAILPOET-5102]
…types [MAILPOET-5102]
[MAILPOET-5102]
[MAILPOET-5102]
[MAILPOET-5102]
[MAILPOET-5102]
[MAILPOET-5102]
This fixes the "fontSizeValue.startsWith is not a function" error. It seems that the font size picker now always expects strings, while the values from SETTINGS_DEFAULTS could be numbers, and we've been using numbers throughout our codebase as well. This also enables the usage of any font size units, such as em and rem. This may be related to: WordPress/gutenberg#44857 [MAILPOET-5102]
[MAILPOET-5102]
[MAILPOET-5102]
[MAILPOET-5102]
[MAILPOET-5102]
[MAILPOET-5102]
0e9218a
to
c2702e9
Compare
[MAILPOET-5102]
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.
Great job!
Description
This PR updates @wordpres/* and React packages. React update is included because some of the wordpress packages have already updated to React 18 and use the new functionality.
Note: After the update, there is the dev console for dev builds.
This is expected for now and will be addressed in a follow-up ticket. Switching to the new render API will turn on the automatic batching feature, and it may cause some issues.
Code review notes
N/A
QA notes
This changes a lot of JS libraries we build on, so potentially, this could cause issues in the whole plugin.
Five parts of the plugin are influenced the most because they heavily use these packages:
Linked PRs
https://github.com/mailpoet/mailpoet-premium/pull/692 - related changes in the premium plugin
mailpoet/wordpress-images#43 - update of the image for CI builds
Linked tickets
MAILPOET-5102
After-merge notes
This also updates the node version in the dev environment so ping devs to update the local node and rebuild the WordPress image in their dev env.