cardinalitypuzzles / cardboard

Dashboard for managing puzzles and tracking status during a puzzle hunt
MIT License
31 stars 21 forks source link

Consolidate frontend UI framework #714

Open akirabaruah opened 6 months ago

akirabaruah commented 6 months ago

Right now, it's a mix of React and Django templating.

rgossiaux commented 6 months ago

Personally I actually don't think this is necessarily desirable a priori. Django's pretty good for rendering basic HTML templates and forms

akirabaruah commented 6 months ago

I think @asdfryan and others brought this up recently as a point of potential developer friction (i.e. frontend devs having to know/learn both React and Django templating).

I agree that Django form handling seems a lot simpler compared to pure React-based options at the moment, though.

akirabaruah commented 6 months ago

Also, I don't think we need this for MITMH 2024, but leaving on the Milestone in case someone happens to want to move it forward.

akirabaruah commented 5 months ago

Personally I actually don't think this is necessarily desirable a priori. Django's pretty good for rendering basic HTML templates and forms

Thought about this some more: For a CRUD-y Django app like Cardboard, it might be simpler to maintain mostly HTML and avoid React as much as possible. Have we considered using something like HTMX (https://htmx.org) for the frontend instead?

In other words, do we really need React and Redux at all?

npinsker commented 5 months ago

In other words, do we really need React and Redux at all?

Maybe this should be a new issue? (the question's like the exact opposite of this issue :P)

rgossiaux commented 5 months ago

I'm not personally particularly attached to React but I also don't really see any particular reason to move off it. Since it's the most common frontend framework I do think that's a strong reason to keep it (makes it easier to contribute)

Redux I don't particularly like & ditto react-table, I wouldn't mind moving off either these libraries if we find a good alternative and someone wants to sink time into it.

akirabaruah commented 5 months ago

Maybe this should be a new issue? (the question's like the exact opposite of this issue :P)

Haha agreed that I brought up a completely opposite point. Since the question of "to React or not to React" is somewhat of a precondition to whether we go all in on React for the frontend UI, I think we should keep the conversation here instead of forking off a new issue.

I also agree with @rgossiaux that React has a large developer mindshare, which can increase contributions. I'm fine keeping it around, though the HTMX example I gave earlier is arguably much simpler than React.

Redux I don't particularly like & ditto react-table, I wouldn't mind moving off either these libraries if we find a good alternative and someone wants to sink time into it.

+1 Redux feels like overkill for this app - maybe we could try using Zustand instead? Or just use React Context?

Filed https://github.com/cardinalitypuzzles/cardboard/issues/772 to remove react-table.