Refactor export menu with new headless UI library
react-aria-menubutton is no longer maintained. It is still on React 17 and CommonJS, which is causing issues in our Cypress tests and for consumer applications.
In this PR, I'm starting the migration to another headless UI library called Ariakit, which seems like a well-maintained, featureful, Typescript-first library. I've considered and discarded other options:
- React Aria from Adobe — I'm not a fan of the fact that it renders class names by default;
- Headless UI from Tailwind — the number of components is quite limited, which might be a hindrance in the future;
- Reach UI — no longer maintained
I'll continue the migration in separate PRs.
I'll investigate the strange failing tests tomorrow...
/approve
Upgrading to the latest version of
ariakitsolved the error I was having in the tests.
Sweet !
On hold, as I noticed that this PR increases the bundle size by more than 100 kB, which seems highly unreasonable for just a popover menu. I'll investigate.
I've tried with React Aria (in branch react-aria) and I get an increase of 185 kB ... still by refactoring only the Export menu.
Mind blowing...
Superseded by #1642