Skip to content

Draft: Different approach to CMS languages

Ben Whitmore requested to merge cms-langs-rework-20240315 into main

This is a quick beginning at reworking !1152 for simpler implementation.

Rather than make every field a JSON object, which introduces a lot of complexity, we just keep an entirely separate layout record for each language.

I've only made a start at this. The graphql uses the new structure, and language selection is working, but I haven't yet added the HiddenTabs component to switch between the various language layouts. And I haven't started work on the Pages page.

Another thing that should be done is: when creating a new layout for a given language, it should be prepopulated with the same settings (and duplicate icons) as the default language. This saves the user having to recreate everything from scratch.

@IvanLeviathan This MR at least indicates my preferred architecture even if it is not all implemented yet. I'd really like to get the HiddenTabs component in place so you can see how that is done, but I'm not sure I will manage that today. The best diff to understand the main changes is this one. The main diffs include some component refactoring I did to split CMSLayoutPage into two components, which makes the diff harder to understand.

Edited by Ben Whitmore

Merge request reports