Fix direct access to individual design on deprecated issue route
What does this MR do?
This MR fixes a bug when directly accessing an individual Design Management design on the deprecated issue route.
71d92460 introduced a change to issue
routes, deprecating the old ones, but still supporting them. There was
added a special variable in issues/_discussion.html.haml
to
inform the Vue app about which of the two possible routes the Vue app
was mounted on.
The calculation of deprecated_route
was previously only returning
true if the user was looking at:
issues/1
issues/1/designs
But not:
issues/1/designs/mydesign.png
In Rails, everything after the designs
segment of the route is
wildcarded as a single param[:vueroute]
so it can be handled by Vue.
An example of an affected route is:
https://gitlab.com/gitlab-org/gitlab/issues/22702/designs/Wiki%20editing.png
which at time of writing does not work. Whereas the non-deprecated route:
https://gitlab.com/gitlab-org/gitlab/-/issues/22702/designs/Wiki%20editing.png
does.
- Issue: #211833 (closed)
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry - [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
-
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
- [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Closes #211833 (closed)