Selecting an insights dashboard does not retain your selection
Summary
When you select an option from the Insights dropdown, your charts display and the dropdown does not retain which view you're on.
Steps to reproduce
Any project will reproduce this under the Insights view -> https://gitlab.com/gl-retrospectives/manage-stage/optimize/insights/#/mergeRequests
What is the expected correct behavior?
Selecting a page should stay reflected in the dropdown
Affected files
Implementation Guide
-
Add a data
property namedselectedPage
-
Update onChangePage
to setselectedPage
when a new page is selected -
Add a computed prop to https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/app/assets/javascripts/insights/components/insights.vue
namedselectedPageName
, this prop should either returnselectedPage.name
or the default text__('Select Page')
-
Replace the dropdown text with the new computed prop -
Update tests
Edited by Ezekiel Kigbo