Skip to content

Resolve "Component: Archived version banner"

Hiru Fernando requested to merge 26-component-archived-version-banner into main

What does this MR do and why?

Describe why, not just what. Include links to relevant issues or discussions.

This MR creates a generic vue component called "banner_render.vue".

A generic component is created as we have two types of banners so far: archive and survey.

A hugo template called banner.html will call these vue components according to several conditions.

  1. Survey banner:
    1. Conditions to render: show_survey_banner in banner.yml file is true AND is production site (pre-release) AND `showArchiveBanner` is false (don't show survey banner if user is in archive site.
  2. Archive banner:
    1. Conditions to render: showArchiveBanner is true AND NOT production site (pre-release) AND show_survey_banner in banner.yml file is false.

Screenshots, screen recordings, or links to review app

These are strongly recommended to assist reviewers and reduce the time to merge your change.

SURVEY BANNER (as expected dismissible) SURVEY BANNER (dismissed)
image.png image.png

ARCHIVE BANNER:

image.png

How to set up and validate locally

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

  1. Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/technical-writing-group/gitlab-docs-hugo/-/blob/main/doc/setup.md.
  2. To test survey banner, set banner.yml's show_survey_banner: true and run pre-release version using normal make view and yarn run dev.
  3. To test archive banner, make sure banner.yml no longer has the change from step 2, run archive version of the site by using CI_COMMIT_REF_NAME=17.0 make view-archive and CI_COMMIT_REF_NAME=17.0 yarn run dev-archive.

Merge request acceptance checklist

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

Closes #26 (closed)

Edited by Hiru Fernando

Merge request reports

Loading