Make all of the project selector vue component's props required
What does this MR do?
This will somewhat address the underlying cause for how this bug occurred.
The app/assets/javascripts/vue_shared/components/project_selector/project_selector.vue component accepts several props, several of which are optional.
The component's UX is not great when those props aren't supplied (that is, the template does not do the sensible thing when these aren't supplied), and so it should be considered a programming error if they aren't supplied.
The way to do that is to make all props required.
The ProjectSelector
component is only used in the Instance Security Dashboard, the Operations Dashboard and the Environments Dashboard, and all three already pass all these props anyway, so there should be no impact.
A future iteration will reduce the burden of having to explicitly supply/wire up these props, by creating a wrapper which does this automatically, connecting it to a dedicated Vuex store.
Addresses #217987 (closed), part of &3330 (closed).
Screenshots
N/A; no visual changes.
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