Skip to content

Add visual indicators for imported comments on designs

What does this MR do and why?

Add the UI and pass data via GraphQL to design notes, so they can show the "Imported" badge when the item is imported. There is a list of similar MRs in the previous issue #443492 (comment 1889447118).

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

Before After (only if the comment is imported)
Visual_indicators_for_comments_on_designs_before Visual_indicators_for_comments_on_designs

How to set up and validate locally

  1. Go to any issue and upload a design. Open the design and add some comments. For example, http://127.0.0.1:3000/gitlab-org/gitlab-test/-/issues/49/designs/Screenshot_2024-05-08_at_21.42.46.png.
  2. Apply the following diff to force show the "Imported" badges:
diff --git a/app/models/concerns/import/has_import_source.rb b/app/models/concerns/import/has_import_source.rb
index cdede6ddc774..4bf8c3df0a4f 100644
--- a/app/models/concerns/import/has_import_source.rb
+++ b/app/models/concerns/import/has_import_source.rb
@@ -25,6 +25,7 @@ module HasImportSource
     end
 
     def imported?
+      return true
       !imported_from_none?
     end
   end

Related to #461147 (closed)

Merge request reports