Update devfile dropdown with file selection option and .devfile.yaml/yml
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
MR: Pending
Description
After we released the devfile dropdown, we have discussions on slack about its further updates. https://gitlab.slack.com/archives/C03KE0L9NC9/p1739261801776849?thread_ts=1738954674.921079&cid=C03KE0L9NC9
And the plan is to add a file selection option, and also include all .*devfile*.yaml/yml
devfiles at the root directory.
Acceptance criteria
-
add the file search option in devfile dropdown -
include all .*devfile*.yaml/yml
devfiles at the root directory into the dropdown option -
make the API hardcoded to a fixed values on return, and remove infinite scrolling -
add metrics for the user usage on both backend and frontend for events below, #519488 (comment 2372159072)
Implementation plan
For file selection option, the GlCollapsibleListbox
already have support, and we just need to enable searchable
attribute on the component. https://gitlab-org.gitlab.io/gitlab-ui/?path=/docs/base-dropdown-collapsible-listbox--docs#search, see the comment below for more design details, #519488 (comment 2346154028)
Update the root directory API call to get all files from root (first 200), and do a filter on filename matching .*devfile*.yaml/yml
query {
project(fullPath:"gitlab-org/gitlab") {
repository {
tree {
blobs(first: 200) {
nodes {
path
}
}
}
}
}
}