-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tabbed translation admin #109
Add tabbed translation admin #109
Conversation
e17c68e
to
a95c3aa
Compare
5da0cf7
to
1ed5c1e
Compare
1ed5c1e
to
ffac13e
Compare
Hi @jieter I added a small test and added the mixin to the example app as well as fixed all pending linter errors. |
55201d3
to
ab7b09b
Compare
7918d3a
to
81eb41d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like the way this works, but I'm a little hesitant because of the amount of code we need to maintain to support it.
I added some superficial comments, I did not attempt to simplify the implementation yet, do you think there is potential to simplify it?
Hey @jieter thanks for taking the time to have a look. I agree with your sentiment that it's some completely new code that will have to be maintained in the future. I tried to keep it minimal using modern JS and no build step. The bulk of the code is required to synchronize the selected languages across all fields and supporting dynamically adding/removing inlines (i.e. fieldsets) in the Django Admin. I feel this sync feature allows for a much better editing experience for content moderators. Removing this feature would indeed get rid of a lot of code, but at the cost of UX. One thing I thought about it that the Django Admin is by design a very slow moving thing, it has barely changed in the last decade. So keeping up to date with upstream is doable with relatively low effort (and I will gladly step up!). PS: One thing I haven't mentioned is that the CSS variables referenced also support django-admin-interface |
@jieter do you have any thoughts? |
Hey @jieter it's been a while, do you not want to see this in |
Co-authored-by: Jan Pieter Waagmeester <[email protected]>
ca369ed
to
e5fbc65
Compare
This change adds simple tabbed UI for translated fields.
Update
This has been released as an independent package
django-modeltrans-tabs
Important: The included JavaScript only supports Django 4.2 and up. I think it's a reasonable change as 3.2 is EOL soon (30 April 2024)
See also: #16 (comment)