Skip to content
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

JS change tracking is very inconsistent #1665

Open
emteknetnz opened this issue Jan 30, 2024 · 0 comments
Open

JS change tracking is very inconsistent #1665

emteknetnz opened this issue Jan 30, 2024 · 0 comments

Comments

@emteknetnz
Copy link
Member

The JS change tracker, which sets the dirty states on the edit form "Save" and "Publish" buttons is very inconsistent

  • Text field on a page - works well changing a value and tabbing out will set a dirty button, reverting the text field will set the button state back to clean
  • TinyMCE on a page - changing a value and tabbing out will update the change tracker, reverting the text field will not revert the button state
  • TextField on a ModelAdmin managed DataObject - simply clicking on the TextField sets a dirty state
  • LinkField - doesn't use the changetracker, instead it directly manipulates the publish button only because that's the only way to set that without also changing the save button
  • Elemental - works very well, updates state as you type instead of when you tab out of an input, however inline saving an elemental will erroneously set the Publish button to clean
  • (not the changetracker though somewhat releated) Elemental with a nested LinkField - inline publishing an element will cascade publish the LinkField, though the draft/modified state of the LinkField is unaltered, you need to refresh the page to see it's published

It really doesn't help that the edit form Save/Publish buttons are regular DOM elements, the change tracker using entwine and a large amount of a input fields are react based.

I feel as though there's simply too much complexity an convolution at this point to properly fix this inconsistency. At this point it feels as though we'd really need the entire CMS in react and we'd need to fully redo the change tracking system which would either use some type of application state, or we'd have a good system of emiting events.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants