Skip to content

(Stability) Implement button selectors #283

@moxious

Description

@moxious

So in vanilla Grafana, many buttons don't have good selectors. Early on, we implemented making it possible to select buttons by their contained text:

              <li class="interactive"
                  data-reftarget="Save & Test"
                  data-targetaction="button">
                Click "Save &amp Test" to save the data source.
              </li>

This was good. But it also has a major drawback: if user is using any other language, this step will obviously break because it relies
on English data-reftarget="Save & Test"

Inside of the plugin, note that DOM selectors appear not to be supported. The text approach is the only approach.

Proposal: In the case of data-targetaction="button"

  • Support EITHER a regular selector as all other OR the text option

I'm saying we punt the translation issue, in part because some buttons are vague enough they may have to be done the text way, until such time as more stable selectors can be put in the code.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions