Skip to content

Add quick suggestions to pipeline editor

What does this MR do and why?

Before, the pipeline editor could not suggestion words based on what the user was typing. Now we are passing an option quickSuggestion: true which is being set to false by the source editor by default (although it's true by default in Monaco documentation, which is a bit odd). Regardless, we now explicitly set it to true, which give us suggestions based on the currently typed letters based on the schema.

Important Note that quick suggestion will also pick up words that aren't keywords. This is the normal default behaviour that we have in monaco and therefore in the WebIDE. The benefit seems to largely outweight the problem, but it's something to be aware.

https://microsoft.github.io/monaco-editor/api/interfaces/monaco.editor.IStandaloneEditorConstructionOptions.html#quickSuggestions

Screenshots or screen recordings

Before After
Screen_Recording_2022-02-01_at_2.34.10_PM Screen_Recording_2022-02-01_at_2.08.32_PM

How to set up and validate locally

  1. Navigate to CI/CD => Editor
  2. Write a new job
  3. Start typing keywords like after_script, script, when, rules, etc
  4. Notice that you are shown suggestions to autocomplete

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #344503 (closed)

Edited by Frédéric Caplette

Merge request reports

Loading