maplibre / maputnik

An open source visual editor for the 'MapLibre Style Specification'
https://www.maplibre.org/maputnik
MIT License
2.04k stars 384 forks source link

[react18] Replace react-aria-menubutton with react-select #846

Open birkskyum opened 7 months ago

birkskyum commented 7 months ago

I tried to update react, and react-aria-menubutton complained it isn't compatible with latest react.

We should probably just swap it. Long story short react-aria-menubutton became less relevant in 2021 with the rise of downshift, which itself got overtaken by react-select last few years.

Screenshot 2023-12-20 at 21 03 44 Screenshot 2023-12-20 at 21 04 14 Screenshot 2023-12-20 at 21 04 37
HarelM commented 7 months ago

I think the path forward is first to use typescript, otherwise updating dependencies will cause things to break only in run time. It shouldn't take long to upgrade to typescript. After that we can swap packages. I also think there's a need to use a component library instead of the proprietary components written here and the storybook here which I have no clue why we should maintain it. But it might be just me... Feel free to review my typescript PRs to streamline the migration to typescript.

birkskyum commented 7 months ago

that's a good idea, and awesome that it's possible to transition with vite in place. on that note react-select has proper typing too, but it's a good idea to use a component library

HarelM commented 7 months ago

Migration is complete, lint is complete, feel free to push this forward. The most well known component library for react that might be a good idea to use is MUI. But I don't have a lot of experience with react to actually say something significant here.

HarelM commented 4 months ago

@birkskyum I've created a PR to update react to version 18. See here:

Can you tell me what I should check in order to see the issue?