cozuya / secret-hitler

A web adaptation of the social deduction board game Secret Hitler. https://secrethitler.io
Other
840 stars 202 forks source link

Remove all jQuery in JSX files #1293

Open Vigasaurus opened 5 years ago

Vigasaurus commented 5 years ago

First will come the death of jQuery in all JSX files. Later will come a full refactor to remove jQuery as a dependency of Semantic-UI, by using the better Semantic - React.

cozuya commented 5 years ago

ya this is embarrassing 😑

Vigasaurus commented 5 years ago

Oh I forgot to attach this - just for reference. JSX/Files Created by us that have it: image

All Files that have it: image

Also, this can get assigned to me - all the JSX changes should be pretty fast (very similar to the changes made in Creategame.jsx)

cozuya commented 5 years ago

So I'm sure you know this but its not just as simple as taking out legacy semantic and replacing with their react components - there's several instances of (horrible I know) directly reading the dom for values. Why I did that way back when I have no idea. Mostly in Creategame I would guess.

Also you will/should need to edit some of the .pugs to remove the hard coded html for the modals.

Vigasaurus commented 5 years ago

I noticed. Every instance of jQuery in Creategame.jsx is already gone with #1291

I think the easiest way to do this tbh will be to just go and drop in Semantic-ui-react and start replacing, as opposed to leaving that for later - but 🤷‍♂️ we'll see how it goes

Vigasaurus commented 5 years ago

And actually I'll hold off on this until you can confirm that you want all jQuery and Semantic handled how it was handled in #1291