8000 UI: Add hover selection support to autocomplete suggestions in codemirror-promql · Issue #16424 · prometheus/prometheus · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
UI: Add hover selection support to autocomplete suggestions in codemirror-promql #16424
Open
@amanycodes

Description

@amanycodes

Proposal

Currently, the codemirror-autocomplete only supports keyboard navigation (up/down keys) to view information about metrics. When users select a metric using arrow keys, additional information appears in a tooltip to the side.
However, there's no support for hovering over suggestions to achieve the same effect. Users have to explicitly use keyboard navigation to see the additional context for each suggestion.

Image

We're currently using CodeMirror's autocomplete functionality via the @codemirror/autocomplete package and it doesn't offer a built-in configuration option for hover selection.

This seems like a nice feature to have since the natural behavior after seeing the autocomplete dropdown is to hover over the options, which currently doesn't trigger any selection. This makes the interface feel a bit broken, forcing users to switch to keyboard navigation. Please let me know if this issue is relevant and if we need this feature.

I am currently working on this and will raise a PR soon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0