Review 12.4 Merged

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

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

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

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 8