analysispreservation.cern.ch icon indicating copy to clipboard operation
analysispreservation.cern.ch copied to clipboard

ui: rename .js files containing JSX to .jsx

Open miguelgrc opened this issue 1 year ago • 2 comments

Currently, all JavaScript files in CAP are .js, regardless of whether they contain JSX or not. Those that contain JSX syntax should have the .jsx extension. This way we will be able to remove the custom compatibility configs we have in vite.config.js and to replace @vitejs/plugin-react with @vitejs/plugin-react-swc (i.e. swc instead of babel for the dev server) for faster dev server updates and HMR. We can simply use something like https://gist.github.com/parties/90cdf35f9a3d05bea6df76dc83a69641 to automatically rename all files containing react code, but we should check that everything has been renamed correctly manually afterwards

miguelgrc avatar Nov 23 '23 14:11 miguelgrc

can i please be assigned this issue?

hacksh4w avatar Feb 18 '24 14:02 hacksh4w

Hi :), thanks for your interest in the project! It's awesome that you want to collaborate and you're most welcome to do so. However I wouldn't recommend starting working on this task for now. We are working on externalizing part of the application (what we call the form builder) as a new standalone library, react-formule, so many files will be changed or removed after we merge https://github.com/cernanalysispreservation/analysispreservation.cern.ch/pull/2859.

If you want, though, you can have a look at the issues for Formule and see if you find anything interesting (maybe https://github.com/cern-sis/react-formule/issues/23 or even https://github.com/cern-sis/react-formule/issues/21 or https://github.com/cern-sis/react-formule/issues/20 if you are interested in playing a bit with RJSF). Let me know if you want to work on anything else or if you need any help.

Cheers, Miguel

miguelgrc avatar Feb 20 '24 14:02 miguelgrc