Skip to content

Add "Imported" badge to Design header

What does this MR do and why?

This is not shown at the moment as the backend is not providing any data.

MR Status
Issues: !149876 (merged) Merged
Merge requests: !150095 (merged) Merged
Epics: !150266 (merged) Merged
User profile activity: !150485 (merged) 🚧 In review
Designs: !150625 (merged) 👈 You are here

Changelog: changed

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

Design header Design header (on hover)
Designs_with_imported_badge Designs_with_imported_badge_tooltip

How to set up and validate locally

  1. Go to any issue, upload a design to it and click on the design. For example, http://127.0.0.1:3000/gitlab-org/gitlab-test/-/issues/40/designs/User_events_with_Imported_badge_desktop.png.
  2. Apply the following diff to show the "Imported" badge
diff --git a/app/assets/javascripts/design_management/components/toolbar/index.vue b/app/assets/javascripts/design_management/components/toolbar/index.vue
index d5777f4eccf1..a2947c07ba19 100644
--- a/app/assets/javascripts/design_management/components/toolbar/index.vue
+++ b/app/assets/javascripts/design_management/components/toolbar/index.vue
@@ -121,7 +121,7 @@ export default {
       return this.design.issue.title;
     },
     isImported() {
-      return this.design.imported;
+      return this.design.imported || true;
     },
     toggleCommentsButtonLabel() {
       return this.isSidebarOpen

Related to #456083 (closed)

Edited by Justin Ho Tuan Duong

Merge request reports

Loading