Resolve "Component: Archived version banner"
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.
-
Survey banner:
- Conditions to render:
show_survey_banner
inbanner.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.
- Conditions to render:
-
Archive banner:
- Conditions to render:
showArchiveBanner
is true AND NOT production site (pre-release) ANDshow_survey_banner
inbanner.yml
file is false.
- Conditions to render:
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) |
---|---|
ARCHIVE BANNER:
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
-
Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/technical-writing-group/gitlab-docs-hugo/-/blob/main/doc/setup.md. -
To test survey banner, set banner.yml
'sshow_survey_banner: true
and run pre-release version using normalmake view
andyarn run dev
. -
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
andCI_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.
-
I have evaluated the MR acceptance checklist for this merge request.
Closes #26 (closed)
Edited by Hiru Fernando