wagtail / wagtail-localize

Translation plugin for Wagtail CMS
https://wagtail-localize.org/
Other
221 stars 83 forks source link

Drop React #715

Open zerolab opened 11 months ago

zerolab commented 11 months ago

While the initial plans were grandiose, they never came to fruition and the focus, requirements and direction have changed. This means the React side of things make maintenance harder than it needs to be.

We should switch to regular HTML with a sprinkle of AJAX (the edit a particular translation bit)

This will allow us to keep up with any Wagtail UI changes and focus on more important functionality and bug fixes

### Tasks
- [ ] Replace React UI with custom form and markup
- [ ] Implement inline (AJAX) saving for individual translation fields
- [ ] Drop React
- [ ] Follow-up automate release management
lb- commented 11 months ago

Just dropped into this repo and saw this, if you need something similar to HTMX's swap (for Ajax style behaviour).

Maybe check out the Swap controller - https://github.com/wagtail/wagtail/blob/main/client/src/controllers/SwapController.ts

Some others may come in handy also.

May be a bit easier that rolling too much custom JS, just patch in to any DOM events as needed. Might be a good use case to se how the Stimulus controllers can be leveraged for plugins.

I also understand if the desire is not to be tied to undocumented (yet) Wagtail internals.

zerolab commented 11 months ago

@lb- thanks for the pointers. I am on a fence about adopting Stimulus in that we still support 4.1 as the LTS and my goal is to reduce additional FE tooling as much as possible because it is a maintenance burden. My goal is to rely on as much core stuff as we can, with a sprinkle of plain JavaScript where needed.

Patching in to any existing DOM events does sound appealing. Will have a think how we can make this work. Gotta spec this out carefully