Support blank space naming for filter dropdown
Currently adding spaces in the names of filter options is not possible. The solution thus far has been to add dashes -
where spaces would exist. But this impairs readability and scanability of the filters list
Considerations
- Using spaces today in the filter bar breaks the query (example video)
- Make sure that old URLs, using the current
-
format still work.
Relevant Files
The Magic
- https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/assets/javascripts/filtered_search/filtered_search_dropdown_manager.js#L160
- https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/assets/javascripts/filtered_search/filtered_search_token_keys.js#L52
- https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/assets/javascripts/filtered_search/filtered_search_manager.js#L734
CE Labels using dashes
- "my-reaction" > https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/assets/javascripts/filtered_search/available_dropdown_mappings.js#L104
- "target-branch" > https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/assets/javascripts/filtered_search/available_dropdown_mappings.js#L138
EE Labels using dashes
- "approved-by" > (not yet merged) !30335 (merged)
Edited by 🤖 GitLab Bot 🤖