Skip to content

Refactor Wikis page bundles

Enrique Alcántara requested to merge refactor-wiki-javascript-bundles into master

What does this MR do and why?

It breaks down a single JavaScript page bundle used by all Wiki pages into smaller JavaScript page bundles that only contain the functionalities required by a given page. These are the new page bundles and what they contain:

  • edit.js contains all the applications used in the Wiki page editor like the WikiForm Vue app, ZenMode, and deleteWikiModal
  • async_edit.js loads the edit page bundle asynchronously. This is required because creating and viewing a Wiki page share the same rails route.
  • git_access loads the clone panel app.
  • diffs load the initDiffStatsDropdown app.

What is the bundle size impact of this change?

This change reduces the bundle size of the Wiki’s read-only pages in 36%!

Screen_Shot_2021-10-05_at_10.42.13_AM

Screenshots or screen recordings

This MR doesn’t introduce user-facing changes

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Enrique Alcántara

Merge request reports