Skip to content

Render "Integration Help" HTML in HAML, but reposition it in Vue

What does this MR do?

This MR is an MVC towards #273269 (closed). It gives us the ability to reposition _help.html.haml partials in Vue. Please, read on!

What is happening here?

We define an element in HAML (.js-integration-help-html). We then place all help-related content under this node.

Then, in Vue, we define a prop helpHtml, which accepts the innerHTML of the .js-integration-help element.

In our Vue template, we render this content with a v-safe-html directive. Additional config for the directive is required for SVG icons.

Why?

  • we need control over where this content is placed in our layout (to achieve #273269 (closed))
  • It's not worth moving all of it to Vue templates - it is static content

Screenshots (strongly suggested)

The below screenshot shows what element is being repositioned (the source code for this particular case is here: app/views/projects/services/slack/_help.haml:

Screen_Shot_2021-01-08_at_12.59.42_pm

Examples below demonstrate no user facing changes.

Example of Jira integration form:

Before After
Screen_Shot_2021-01-11_at_3.12.53_pm Screen_Shot_2021-01-11_at_3.14.03_pm

An example of SVG icons rendering correctly (this is for the "Slack slash command" integration):

Before After
Screen_Shot_2021-01-08_at_1.04.11_pm Screen_Shot_2021-01-11_at_3.23.32_pm

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 #273269 (closed)

Edited by Tom Quirk

Merge request reports