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 dataproperty namedselectedPage -
Update onChangePageto setselectedPagewhen 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.vuenamedselectedPageName, this prop should either returnselectedPage.nameor the default text__('Select Page') -
Replace the dropdown text with the new computed prop -
Update tests
Edited by Ezekiel Kigbo
