When using the /unlabel command it would be a better user experience if the autocomplete list of labels was limited to the list of labels currently assigned to the issue.
From #27319 (closed), I would add the case: when typing /labeldon't show the applied labels in the autocomplete list OR have a “check” icon as in the label editing dropdown list:
Pedro Moreira da Silvachanged title from Issue slash commands - unlabel - limit autocomplete to currently selected items to /unlabel slash command - limit autocomplete to applied labels
changed title from Issue slash commands - unlabel - limit autocomplete to currently selected items to /unlabel slash command - limit autocomplete to applied labels
We have two similar functions of loading labels on an issuable page:
and
Can we save a backend result for both functions in frontend?
Then we can make UI work faster since we take the data from the backend only once.
Is it worth to do from the frontend perspective?
@blackst0ne That seems like it might tie in with real time updating of issues. It would be nice to have a model on the front end that can be assumed to be fresh so that user interactions like this are not blocked on API calls.
Can we save a backend result for both functions in frontend?
@blackst0ne Currently not as far as I know but I am working on similar functionality for #30467 (closed). Once I am done with that, I will open an issue about other situations where we could use it (like here).
At some point, that would be nice but this would include quite a bit of refactor, so I don't think that consolidation of the API call will happen anytime soon
Rémy Coutablechanged title from /unlabel slash command - limit autocomplete to applied labels to {+/unlabel quick action+} - limit autocomplete to applied labels
changed title from /unlabel slash command - limit autocomplete to applied labels to {+/unlabel quick action+} - limit autocomplete to applied labels