Skip to content

Add support for private contribution event

Peter Hegman requested to merge 378677-add-private-event into master

What does this MR do and why?

Related to #378677 (closed)

In &9056 we are migrating the user profile from HAML/jQuery to Vue. This is a large migration so we are splitting it up into many sections. This MR continues to build out the Activity section on the Overview tab.

There are many contribution events that we will need to support. These are documented in https://docs.gitlab.com/ee/user/profile/contributions_calendar.html#user-contribution-events. Some contribution events are private. If the user has the Include private contributions on your profile setting checked in /-/profile these events will be shown as private contributions. This MR adds support for private contribution events.

Reviewer note: There are currently two bugs on the user profile when signed out. The followers/following error will be solved by #412929. The console errors are related to the Personal projects section and will be fixed in !125615 (merged)

UX note: There is currently an incorrect bottom border in the tabs. This is due to a recent change in !118597 (merged). We will be removing the tabs and moving the navigation into the new sidebar in #389842. By removing the tabs we will be able to fix this bug and because this is behind a feature flag I am going to leave it as-is for now.

Screenshots or screen recordings

Before After
Screenshot_2023-07-07_at_11.48.25_AM Screenshot_2023-07-07_at_11.47.07_AM

How to set up and validate locally

  1. Open the rails console
    • bin/rails console
  2. Enable the profile_tabs_vue feature flag
    • Feature.enable(:profile_tabs_vue)
  3. Sign in as root user
  4. Navigate to /-/profile
  5. Check the Include private contributions on your profile setting and save the form
  6. Navigate to an issue in a private project and leave a comment
  7. In a private/incognito window navigate to http://127.0.0.1:3000/root

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Peter Hegman

Merge request reports