Add "Imported" badge to Snippet header
What does this MR do and why?
Add "Imported" badge to Snippet header. This is not shown at the moment as the backend is not providing any data.
Changelog: changed
Here is the list of visual indicator MRs for "Imported" badge:
MR | Status |
---|---|
Issues: !149876 (merged) |
|
Merge requests: !150095 (merged) |
|
Epics: !150266 (merged) |
|
User profile activity: !150485 (merged) |
|
Designs: !150625 (merged) |
|
Snippets: !150828 (merged) |
|
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Snippet |
---|
How to set up and validate locally
- Go to Project > Code > Snippets and create a snippet if there isn't already one. Go to the snippet details page. For example,
http://127.0.0.1:3000/gitlab-org/gitlab-test/-/snippets/21
. - Apply this diff to show the imported badge:
diff --git a/app/assets/javascripts/snippets/components/snippet_header.vue b/app/assets/javascripts/snippets/components/snippet_header.vue
index 3ee0a582df76..f63754fe721e 100644
--- a/app/assets/javascripts/snippets/components/snippet_header.vue
+++ b/app/assets/javascripts/snippets/components/snippet_header.vue
@@ -361,7 +361,7 @@ export default {
</div>
<imported-badge
- v-if="snippet.imported"
+ v-if="snippet.imported || true"
:importable-type="$options.TYPE_SNIPPET"
class="gl-mr-2"
/>
Related to #457868 (closed)
Edited by Justin Ho Tuan Duong