Skip to content

Avoid nested links in trial status widget (fixes #464377)

david hamp-gonsalves requested to merge issue-464377 into master

Resolves #464377 (closed)

What does this MR do and why?

Avoids the nesting of links in the trial status widget and the trial status popover.

Details

This is a small code change but the trade-offs of each potential option are a little bigger.

I have chosen to handle this using the onClick handler because I think it creates the least code smell while providing the best UX experience.

Alternatively we could have used pseudo elements to expand the clickable area of one of the links to occupy the entire parent but this breaks the users ability to select the underlying content, leads to some non-obvious CSS and is brittle since it will break if another container element is later added which wraps the link section. Using the click handler also addresses the popover nested links as well which would be a separate change using psuedo element approach.

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

There are no UI changes created by these changes. Screen shot of UX area bellow.

Screenshot_2024-07-09_at_10.17.35_AM

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Simulate saas and restart gdk

  2. Login and create a group

  3. In rails console, change the trial start and end date for the group

    Group.find_by(name: your_group_name).gitlab_subscription.update_columns(trial_starts_on: 31.days.ago, trial_ends_on: 1.days.ago)
  4. Go to group overview page and check super sidebar, you should see the trial-end widget.

  5. In rails console, run this to change the group to be in an active trial:

    Group.find_by(name: your_group_name).gitlab_subscription.update_columns(trial: true, hosted_plan_id: 7, trial_starts_on: 10.days.ago, trial_ends_on: 20.days.from_now)
  6. Refresh the group overview page, you should see the active trial widget in the sidebar.

Edited by david hamp-gonsalves

Merge request reports