Skip to content

Do not render Source Editor by default for the repository files

What does this MR do?

Introduces the conditional loading of the Source Editor component (formerly known as Editor Lite) in the repository browser. The editor is loaded o nthe view only in case:

  1. rawContent is specified on the viewer, AND
  2. the :refactor_blob_viewer feature flag is enabled

This is required to prevent monaco chunk to be loaded everywhere where the simple_viewer is used.

Screenshots (strongly suggested)

Before After
Snippet Screenshot_2021-04-15_at_00.53.18 Screenshot_2021-04-15_at_00.48.20

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related to #327782 (closed)

Edited by Denys Mishunov

Merge request reports

Loading