Review main Merged

78501[BUGFIX] Move module state into reloadable part of DOM

Andreas Kienast CR +2 V +2 Easy +32 −13 updated 08/07/23, 12:04

Commit message

The module menu is currently in a bad shape where different loose DOM
elements and scripts are tangled together and do stuff. Previously, the
module state was stored as a JSON-encoded string in the container of
the actual module menu, which isn't refreshed when the module menu is
reloaded via AJAX, leading to endless "loading" modules a freshly
installed extension may add. Also, the JSON string gets parsed once and
is then cached for faster access times.

This patch accomplished multiple things:
* the module state information is moved to the `nav` element of the
  module menu that's part of the reload process, always having the
  current state
* an internal `flushModuleCache()` function is introduced to clear the
  cached, parsed state

This is not an ideal solution but the best way the issue can be fixed in
short-term. In long-term, the whole module structure and its handling
need refactoring.

Review

  • Code review CR +2 Done
    • Andreas Kienast +2
    • Stefan Bürk +1
    • Christian Kuhn +1
    • Benni Mack +1
  • Verified V +2 Done
    • Andreas Kienast +2
    • Stefan Bürk +1
    • Christian Kuhn +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 8

Review log 1216

  1. Andreas Kienast uploaded patch set 1 04/06/23, 07:22

  2. core-ci voted on patch set 1 V +1 04/06/23, 07:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40236

  3. Benni Mack commented on patch set 1 04/06/23, 07:42

    Ideally we'd use state handling ;) in the future
  4. Andreas Kienast uploaded patch set 2 V +1 04/06/23, 08:31

  5. core-ci voted on patch set 2 V +1 04/06/23, 08:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40241

  6. Benjamin Kott commented on patch set 2 04/06/23, 09:00

    As mentioned in the comments in https://review.typo3.org/c/Packages/TYPO3.CMS/+/75879 this does only solve the problem partly again. We are currently stuck, since when new extensions are installed we also need to consider that they can add css/js to the global scope. This can only be solved by reloading the backend entirely in it´s current state.
  7. Andreas Kienast rebased onto patch set 3 V +1 08/03/23, 18:53

  8. core-ci voted on patch set 3 V +1 08/03/23, 19:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44943

  9. Anja Leichsenring voted on patch set 3 V +1 CR +1 08/04/23, 11:09

  10. Christian Kuhn updated the commit message in patch set 4 CR +1 V +1 08/05/23, 20:27

  11. Christian Kuhn voted on patch set 4 V +1 CR +1 08/05/23, 20:27

  12. core-ci voted on patch set 4 V +1 08/05/23, 20:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45125

  13. Stefan Bürk voted on patch set 4 V +1 CR +1 08/06/23, 16:38

  14. Benni Mack voted on patch set 4 V +1 CR +1 08/07/23, 08:54

  15. Andreas Kienast voted on patch set 4 V +2 CR +2 08/07/23, 12:04

  16. Andreas Kienast merged patch set 5 08/07/23, 12:04