Avoid nested links in trial status widget (fixes #464377)
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.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
-
Simulate saas and restart gdk
-
Login and create a group
-
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)
-
Go to group overview page and check super sidebar, you should see the trial-end widget.
-
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)
-
Refresh the group overview page, you should see the active trial widget in the sidebar.