feat(explore): Implement metrics and columns popovers empty states (#18681)

* feat(explore): Implement empty states for column and metrics popovers

* Fix test

* Change copy
This commit is contained in:
Kamil Gabryjelski
2022-02-14 15:26:56 +01:00
committed by GitHub
parent f8b3ece27b
commit c1205b5279
7 changed files with 111 additions and 55 deletions

View File

@@ -37,6 +37,7 @@ import { DndControlProps } from './types';
export type DndColumnSelectProps = DndControlProps<QueryFormColumn> & {
options: Record<string, ColumnMeta>;
isTemporal?: boolean;
};
export function DndColumnSelect(props: DndColumnSelectProps) {
@@ -49,6 +50,7 @@ export function DndColumnSelect(props: DndColumnSelectProps) {
ghostButtonText,
name,
label,
isTemporal,
} = props;
const [newColumnPopoverVisible, setNewColumnPopoverVisible] = useState(false);
@@ -151,6 +153,7 @@ export function DndColumnSelect(props: DndColumnSelectProps) {
onChange(optionSelector.getValues());
}}
editedColumn={column}
isTemporal={isTemporal}
>
<OptionWrapper
key={idx}
@@ -244,6 +247,7 @@ export function DndColumnSelect(props: DndColumnSelectProps) {
togglePopover={togglePopover}
closePopover={closePopover}
visible={newColumnPopoverVisible}
isTemporal={isTemporal}
>
<div />
</ColumnSelectPopoverTrigger>