silx-kit / h5web

React components for data visualization and exploration
https://h5web.panosc.eu/
MIT License
167 stars 17 forks source link

Refactor export menu with new headless UI library #1567

Closed axelboc closed 1 month ago

axelboc commented 5 months ago

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:

I'll continue the migration in separate PRs.

axelboc commented 5 months ago

I'll investigate the strange failing tests tomorrow...

axelboc commented 3 months ago

/approve

loichuder commented 3 months ago

Upgrading to the latest version of ariakit solved the error I was having in the tests.

Sweet !

axelboc commented 3 months ago

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.

axelboc commented 2 months ago

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...

axelboc commented 1 month ago

Superseded by #1642