Skip to content

Add unlimited members alert to Project/Group members page

Ross Byrne requested to merge 376224-members-page-trial-alert into master

What does this MR do and why?

Implements solution to https://gitlab.com/gitlab-org/gitlab/-/issues/376224.

This MR adds a new alert that will appear on the Group and Project members page.

Updates

Alert was moved to appear above the breadcrumbs based on !110748 (comment 1291487675). Screenshots have been updated.

Display Conditions

During development, the display conditions were fine tuned (see https://gitlab.com/gitlab-org/gitlab/-/issues/376224#note_1281287346).

The alert will be displayed when the following conditions are met:

  • The namespace is private and on a trial
  • The user is an owner of the namespace
  • If in a Project, the user can admin the project
  • The user has not dismissed the alert

Once the alert is visible to the user / namespace owner, it will stop showing when:

  • The user dismisses the alert
  • The namespace is no longer on a trial
  • The namespace is made public
  • The user loses admin rights to the namespace

Alerts are scoped to a namespace, using UserGroupCallouts. Dismissing an alert for one namespace will not dismiss it for others.

Dismissing an alert anywhere in a namespace hierarchy will dismiss it for the whole namespace. E.G. if you dismiss the alert in a child project or subgroup, it will no longer appear anywhere in the namespace.

Call To Actions

The primary CTA will always bring the user to the namespace billing page, i.e. /groups/{unique_group_UR_path}/-/billings

Screenshots or screen recordings

Screenshot_2023-03-08_at_14.26.43

How to set up and validate locally

  1. Setup your local GDK to simulate a SAAS instance.
  2. Navigate to the following locations:
    • Group -> Members
    • Group -> Subgroup -> Members
    • Project -> Members

Note: Because it is a pain to setup a trial for a group locally, go to the file ee/app/helpers/ee/users/group_callouts_helper.rb and on line 13, replace group.trial_active? with true.

MR acceptance checklist

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

Related to #376224

Edited by Ross Byrne

Merge request reports