Skip to content

Redirect `groups/*id/-/details` to `/*id`

Peter Hegman requested to merge peterhegman/redirect-group-details-page into master

What does this MR do and why?

The groups/*id/-/details route currently renders the same template as the main group landing page. In #23466 (closed) we recently migrated the tabs on that page from HAML/jQuery to Vue (behind the group_overview_tabs_vue feature flag). The old tabs implementation updated the URL on groups/*id/-/details to /*id with JavaScript so then when you refresh the page you actually hit the main group landing page. The new Vue tabs doesn't do this and instead only controls the /-/<active tab> part of the URL. This causes issues because when you switch tabs the URL is not correct and then if you refresh you get a 404. To fix this bug, this MR redirects groups/*id/-/details to /*id at the controller level. I searched the codebase and couldn't find any references to a link or button that directly links to the /-/details route, so I am guessing it is an old route. See screen recordings below for more context:

Screenshots or screen recordings

group_overview_tabs_vue feature flag disabled

Before After
Screen_Recording_2022-11-07_at_3.03.29_PM Screen_Recording_2022-11-07_at_3.04.40_PM

group_overview_tabs_vue feature flag enabled

Before After
Screen_Recording_2022-11-07_at_3.02.19_PM Screen_Recording_2022-11-07_at_3.08.00_PM

How to set up and validate locally

Navigate to http://gdk.test:3000/groups/flightjs/-/details

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

Loading