Improve namespace filters in Admin Area > Projects
Background Context: &17782 (comment 2640998341)
We'd like to improve the UX for namespace filters by making the following changes:
- Display the
Avatar + Display Nameof the selected namespace. - Display the
Avatar + Display Name + Usernameof the namespace options. - Create the following sections in the options list:
- Recently used
- Groups
- Users
Design Reference
Implementation Guide
- Create a query to retrieve the available user and groups namespace in
app/assets/javascripts/vue_shared/components/filtered_search_bar/queries/namespaces.query.graphql
query namespaces($search: String) {
users(search: $search, first: 10) {
nodes {
id
name
avatarUrl
fullPath: username
path: username
}
}
groups(search: $search, first: 10) {
nodes {
id
name
avatarUrl
fullPath
path
}
}
}
- Refactor
app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/namespace_token.vueto implement a customgl-filtered-search-tokeninstead of usingbase-token:- The suggestions should be divided into
Recently used,Groups,Users - You may use this patch as inspiration. Note that we can't follow this exactly because it uses
base-tokenwhich isn't compatible with all the features that we need for this component.
- The suggestions should be divided into
Edited by 🤖 GitLab Bot 🤖

