Skip to content

Build contribution calendar component on profile

Peter Hegman requested to merge 378676-overview-tab-activity-calendar into master

What does this MR do and why?

Related to #378676 (closed)

In &9056 we are incrementally migrating the tabs on the profile from a mix of HAML/jQuery to full Vue.

This MR creates a Vue component for the contribution calendar and renders it in the Overview tab. It does not yet implement clicking on a day to see the specific activity. That is currently blocked by #378695 (closed) and will implemented in a separate MR.

Furthermore, since app/assets/javascripts/pages/users/activity_calendar.js is still required when the profile_tabs_vue feature flag is disabled we are keeping it for now and using it in the Vue component. Once we finish &9056 and remove the feature flag we can move that logic directly into app/assets/javascripts/profile/components/activity_calendar.vue and remove that file. This will be tracked in #393099

Screenshots or screen recordings

Desktop

profile_tabs_vue feature flag disabled profile_tabs_vue enabled
Screenshot_2023-02-23_at_12.11.44_PM Screenshot_2023-02-23_at_12.02.07_PM

Tablet

profile_tabs_vue feature flag disabled profile_tabs_vue enabled
Screenshot_2023-02-23_at_12.31.21_PM Screenshot_2023-02-23_at_12.09.54_PM

Mobile

profile_tabs_vue feature flag disabled profile_tabs_vue enabled
Screenshot_2023-02-23_at_12.12.09_PM Screenshot_2023-02-23_at_12.09.03_PM

How to set up and validate locally

  1. Enable the profile_tabs_vue feature flag
    • bin/rails console
    • Feature.enable(:profile_tabs_vue)
  2. Go to your profile

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