Skip to content

Add "Imported" text to User profile activity

What does this MR do and why?

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

Here is the list of visual indicator MRs for "Imported" badge:

MR Status
Issues: !149876 (merged) Merged
Merge requests: !150095 (merged) Merged
Epics: !150266 (merged) Merged
User profile activity: !150485 (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

Mobile Desktop
User_events_with_Imported_badge_mobile User_events_with_Imported_badge_desktop

How to set up and validate locally

  1. Go to any profile. For examplem, http://127.0.0.1:3000/root.
  2. Apply the following diff to show the imported text for some events:
diff --git a/app/views/events/_event.html.haml b/app/views/events/_event.html.haml
index 432070ed28a1..4642155a5d3e 100644
--- a/app/views/events/_event.html.haml
+++ b/app/views/events/_event.html.haml
@@ -4,7 +4,7 @@
   .event-item.gl-border-bottom-0.gl-pb-3{ class: current_path?('users#activity') ? 'user-profile-activity gl-pl-7!' : 'project-activity-item' }
     .event-item-timestamp.gl-font-sm
       #{time_ago_with_tooltip(event.created_at)}
-      - if event.imported?
+      - if event.imported? || event.id % 2 == 1
         %span •
         = render "import/shared/imported_text", importable: _('event')

Related to #456084 (closed)

Edited by Justin Ho Tuan Duong

Merge request reports