Add/Edit Panel: Enable new DS picker toggle by default (#68380)

* Add Panel: Enable new DS picker and onboarding DS prompt

* Add e2e selectors
This commit is contained in:
Ivan Ortega Alba
2023-05-12 17:09:30 +02:00
committed by GitHub
parent 78afddebbf
commit ede8df846e
5 changed files with 52 additions and 49 deletions

View File

@@ -5,6 +5,7 @@ import React, { useCallback, useEffect, useRef, useState } from 'react';
import { usePopper } from 'react-popper';
import { DataSourceInstanceSettings, GrafanaTheme2 } from '@grafana/data';
import { selectors } from '@grafana/e2e-selectors';
import { reportInteraction } from '@grafana/runtime';
import { DataSourceJsonData } from '@grafana/schema';
import { Button, Icon, Input, ModalsController, Portal, useStyles2 } from '@grafana/ui';
@@ -103,12 +104,13 @@ export function DataSourceDropdown(props: DataSourceDropdownProps) {
const styles = useStyles2(getStylesDropdown);
return (
<div className={styles.container}>
<div className={styles.container} data-testid={selectors.components.DataSourcePicker.container}>
{/* This clickable div is just extending the clickable area on the input element to include the prefix and suffix. */}
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */}
<div className={styles.trigger} onClick={openDropdown}>
<Input
className={inputHasFocus ? undefined : styles.input}
data-testid={selectors.components.DataSourcePicker.inputV2}
prefix={
filterTerm && isOpen ? (
<DataSourceLogoPlaceHolder />