Upgrade Reakit to stable v1.0.0#22352
Conversation
|
Size Change: -1.1 kB (0%) Total Size: 832 kB
ℹ️ View Unchanged
|
gziolo
left a comment
There was a problem hiding this comment.
Code looks good, it's great to see stable version integrated :)
I guess it's best to leave it to @ItsJonQ to ensure that updated components work as expected. I can try to validate myself tomorrow if he won't be able to take care of it.
|
Fixed unit tests. We may want to use @ItsJonQ Also, I remember you tried to use |
I have too many things going on, but I would be interested in doing an audit of existing RTL tests and updating them according to the guidelines shared by @kentcdodds in https://kentcdodds.com/blog/common-mistakes-with-react-testing-library. This way we will be able to reference this article in the testing guidelines and call it a day. I think it also means we should include the library you mentioned :) |
ItsJonQ
left a comment
There was a problem hiding this comment.
@diegohaz Looks good to me! 🚀
Tested it locally with Toolbars and the Alignment controls, and it works as expected
Also, I remember you tried to use aria-activedescendant on AlignmentMatrixControl in the first iterations. If it's still needed, it should be working now (by passing unstable_virtual: true to useCompositeState).
I briefly tried passing the unstable_virtual prop into the useCompositeState. I didn't notice a difference, which I suppose is a good thing. I remember it not working previously.
We can test it some more and update it after this is merged 👏
Description
This PR upgrades the
reakitdependency on@wordpress/componentsto the stablev1.0.0.Two things were fixed that are relevant to us:
onMouseDownonToolbarItems no longer prevents drag events from happening.CompositeItemis now focused on VoiceOver clicks (Control+Option+Space), so we don't need this piece of code onAlignmentMatrixControlanymore.How has this been tested?
AlignmentMatrixControlintroduced on Cover: Customizing Alignment of inner content #21091.