diff --git a/frontend/src/lib/components/CloseButton.tsx b/frontend/src/lib/components/CloseButton.tsx deleted file mode 100644 index abd6ca7d2ef77..0000000000000 --- a/frontend/src/lib/components/CloseButton.tsx +++ /dev/null @@ -1,12 +0,0 @@ -// eslint-disable-next-line no-restricted-imports -import { CloseOutlined } from '@ant-design/icons' - -// TODO: Remove, but de-ant PropertyFilterButton and SelectGradientOverflow first -export function CloseButton(props: Record): JSX.Element { - return ( - /* eslint-disable-next-line react/forbid-dom-props */ - - - - ) -} diff --git a/frontend/src/lib/components/DefinitionPopover/DefinitionPopoverContents.tsx b/frontend/src/lib/components/DefinitionPopover/DefinitionPopoverContents.tsx index 1c9e4928ecb22..506931f867188 100644 --- a/frontend/src/lib/components/DefinitionPopover/DefinitionPopoverContents.tsx +++ b/frontend/src/lib/components/DefinitionPopover/DefinitionPopoverContents.tsx @@ -395,7 +395,7 @@ function DefinitionEdit(): JSX.Element { setLocalDefinition({ tags })} + onChange={(tags) => setLocalDefinition({ tags })} saving={false} /> diff --git a/frontend/src/lib/components/ObjectTags/ObjectTags.tsx b/frontend/src/lib/components/ObjectTags/ObjectTags.tsx index aa4ca58253c96..727ac1b5a639f 100644 --- a/frontend/src/lib/components/ObjectTags/ObjectTags.tsx +++ b/frontend/src/lib/components/ObjectTags/ObjectTags.tsx @@ -1,20 +1,14 @@ -// eslint-disable-next-line no-restricted-imports -import { CloseOutlined, SyncOutlined } from '@ant-design/icons' -import { IconPlus } from '@posthog/icons' -import { LemonTag, LemonTagType } from '@posthog/lemon-ui' -import { Select } from 'antd' +import { IconPencil, IconPlus } from '@posthog/icons' +import { LemonInputSelect, LemonTag, LemonTagType } from '@posthog/lemon-ui' import clsx from 'clsx' import { useActions, useValues } from 'kea' import { objectTagsLogic } from 'lib/components/ObjectTags/objectTagsLogic' -import { Spinner } from 'lib/lemon-ui/Spinner/Spinner' import { colorForString } from 'lib/utils' import { CSSProperties, useMemo } from 'react' import { sceneLogic } from 'scenes/sceneLogic' import { AvailableFeature } from '~/types' -import { SelectGradientOverflow } from '../SelectGradientOverflow' - interface ObjectTagsPropsBase { tags: string[] saving?: boolean @@ -34,7 +28,7 @@ export type ObjectTagsProps = | (ObjectTagsPropsBase & { /** Tags CAN be added or removed.*/ staticOnly?: false - onChange?: (tag: string, tags?: string[], id?: string) => void + onChange?: (tags: string[]) => void /** List of all tags that already exist. */ tagsAvailable?: string[] /** Whether this field should be gated behind a "paywall". */ }) @@ -55,15 +49,14 @@ export function ObjectTags({ tagsAvailable, style = {}, staticOnly = false, - id, // For pages that allow multiple object tags className, 'data-attr': dataAttr, }: ObjectTagsProps): JSX.Element { const objectTagId = useMemo(() => uniqueMemoizedIndex++, []) - const logic = objectTagsLogic({ id: objectTagId, onChange, tags }) + const logic = objectTagsLogic({ id: objectTagId, onChange }) const { guardAvailableFeature } = useActions(sceneLogic) - const { addingNewTag, cleanedNewTag, deletedTags } = useValues(logic) - const { setAddingNewTag, setNewTag, handleDelete, handleAdd } = useActions(logic) + const { editingTags } = useValues(logic) + const { setEditingTags, setTags } = useActions(logic) /** Displaying nothing is confusing, so in case of empty static tags we use a dash as a placeholder */ const showPlaceholder = staticOnly && !tags?.length @@ -77,99 +70,56 @@ export function ObjectTags({ }) } + const hasTags = tagsAvailable && tagsAvailable.length > 0 + return ( // eslint-disable-next-line react/forbid-dom-props
- {showPlaceholder - ? '—' - : tags - .filter((t) => !!t) - .map((tag, index) => { - return ( - - {tag}{' '} - {!staticOnly && - onChange && - (deletedTags.includes(tag) ? ( - - ) : ( - - onGuardClick(() => { - handleDelete(tag) - }) - } - /> - ))} - - ) - })} - {saving && } - {!staticOnly && onChange && saving !== undefined && ( - - - onGuardClick(() => { - setAddingNewTag(true) - }) - } - data-attr="button-add-tag" - icon={} - className="border border-dashed" - style={{ - display: addingNewTag ? 'none' : 'inline-flex', - }} - > - Add tag - - {addingNewTag && ( - setAddingNewTag(false)} - data-attr="new-tag-input" - autoFocus - allowClear - autoClearSearchValue - defaultOpen - showSearch - style={{ width: 160 }} - onChange={(changedValue) => handleAdd(changedValue)} - loading={saving} - onSearch={setNewTag} - placeholder='try "official"' - > - {cleanedNewTag ? ( - - {cleanedNewTag} - - ) : ( - (!tagsAvailable || !tagsAvailable.length) && ( - - Type to add a new tag - - ) - )} - {tagsAvailable && - tagsAvailable.map((tag) => ( - - {tag} - - ))} - + {editingTags ? ( + ({ key: t, label: t }))} + onChange={setTags} + onBlur={() => setEditingTags(false)} + loading={saving} + data-attr="new-tag-input" + placeholder='try "official"' + autoFocus + /> + ) : ( + <> + {showPlaceholder + ? '—' + : tags + .filter((t) => !!t) + .map((tag, index) => { + return ( + + {tag} + + ) + })} + {!staticOnly && onChange && saving !== undefined && ( + + + onGuardClick(() => { + setEditingTags(true) + }) + } + data-attr="button-add-tag" + icon={hasTags ? : } + className="border border-dashed" + size="small" + > + {hasTags ? 'Edit tags' : 'Add tag'} + + )} - + )}
) diff --git a/frontend/src/lib/components/ObjectTags/objectTagsLogic.ts b/frontend/src/lib/components/ObjectTags/objectTagsLogic.ts index 53420e846ad24..82cd8b83897d9 100644 --- a/frontend/src/lib/components/ObjectTags/objectTagsLogic.ts +++ b/frontend/src/lib/components/ObjectTags/objectTagsLogic.ts @@ -1,13 +1,10 @@ -import equal from 'fast-deep-equal' -import { actions, kea, key, listeners, path, props, propsChanged, reducers, selectors } from 'kea' -import { lemonToast } from 'lib/lemon-ui/LemonToast/LemonToast' +import { actions, kea, key, listeners, path, props, reducers } from 'kea' import type { objectTagsLogicType } from './objectTagsLogicType' export interface ObjectTagsLogicProps { id: number - onChange?: (tag: string, tags: string[]) => void - tags: string[] + onChange?: (tags: string[]) => void } function cleanTag(tag?: string): string { @@ -21,66 +18,22 @@ export const objectTagsLogic = kea([ key((props) => props.id), actions({ setTags: (tags: string[]) => ({ tags }), - setAddingNewTag: (addingNewTag: boolean) => ({ addingNewTag }), - setNewTag: (newTag: string) => ({ newTag }), + setEditingTags: (editingTags: boolean) => ({ editingTags }), handleDelete: (tag: string) => ({ tag }), - handleAdd: (addedTag: string) => ({ addedTag }), + handleAdd: (nextTags: string[]) => ({ nextTags }), }), - reducers(({ props }) => ({ - tags: [ - props.tags, - { - setTags: (_, { tags }) => tags, - }, - ], - addingNewTag: [ + reducers(() => ({ + editingTags: [ false, { - setAddingNewTag: (_, { addingNewTag }) => addingNewTag, - setTags: () => false, - }, - ], - newTag: [ - '', - { - setNewTag: (_, { newTag }) => newTag, - setTags: () => '', - }, - ], - deletedTags: [ - [], - { - handleDelete: (state, { tag }) => [...state, tag], + setEditingTags: (_, { editingTags }) => editingTags, }, ], })), - selectors({ - cleanedNewTag: [(s) => [s.newTag], (newTag) => cleanTag(newTag)], - }), - listeners(({ values, props, actions }) => ({ - handleDelete: async ({ tag }) => { - const newTags = values.tags.filter((_t) => _t !== tag) - props.onChange?.(tag, newTags) - - // Update local state so that frontend is not blocked by server requests - actions.setTags(newTags) - }, - handleAdd: async ({ addedTag }) => { - const cleanedAddedTag = cleanTag(addedTag) - if (values.tags?.includes(cleanedAddedTag)) { - lemonToast.error(`Tag "${cleanedAddedTag}" already is in the list`) - return - } - const newTags = [...(values.tags || []), cleanedAddedTag] - props.onChange?.(cleanedAddedTag, newTags) - - // Update local state so that frontend is not blocked by server requests - actions.setTags(newTags) + listeners(({ props }) => ({ + setTags: ({ tags }) => { + const nextTags = tags.map(cleanTag) + props.onChange?.(nextTags) }, })), - propsChanged(({ actions, props }, oldProps) => { - if (!equal(props.tags, oldProps.tags)) { - actions.setTags(props.tags) - } - }), ]) diff --git a/frontend/src/lib/components/PropertyFilters/PropertyFilters.tsx b/frontend/src/lib/components/PropertyFilters/PropertyFilters.tsx index e9bc8ff5c1222..7537468bae9f4 100644 --- a/frontend/src/lib/components/PropertyFilters/PropertyFilters.tsx +++ b/frontend/src/lib/components/PropertyFilters/PropertyFilters.tsx @@ -121,10 +121,6 @@ export function PropertyFilters({ disablePopover={disablePopover || orFiltering} addText={addText} hasRowOperator={hasRowOperator} - selectProps={{ - delayBeforeAutoOpen: 150, - placement: pageKey === 'insight-filters' ? 'bottomLeft' : undefined, - }} propertyAllowList={propertyAllowList} taxonomicFilterOptionsFromProp={taxonomicFilterOptionsFromProp} allowRelativeDateOptions={allowRelativeDateOptions} diff --git a/frontend/src/lib/components/PropertyFilters/types.ts b/frontend/src/lib/components/PropertyFilters/types.ts index 7f97322656c58..d29e0811a2f7b 100644 --- a/frontend/src/lib/components/PropertyFilters/types.ts +++ b/frontend/src/lib/components/PropertyFilters/types.ts @@ -1,5 +1,4 @@ import { propertyFilterLogic } from 'lib/components/PropertyFilters/propertyFilterLogic' -import { SelectGradientOverflowProps } from 'lib/components/SelectGradientOverflow' import { TaxonomicFilterGroup, TaxonomicFilterGroupType, @@ -36,7 +35,6 @@ export interface TaxonomicPropertyFilterLogicProps extends PropertyFilterBasePro export interface PropertyFilterInternalProps { pageKey?: string index: number - selectProps: Partial onComplete: () => void disablePopover: boolean taxonomicGroupTypes?: TaxonomicFilterGroupType[] diff --git a/frontend/src/lib/components/SelectGradientOverflow.scss b/frontend/src/lib/components/SelectGradientOverflow.scss deleted file mode 100644 index 344855c6dd49d..0000000000000 --- a/frontend/src/lib/components/SelectGradientOverflow.scss +++ /dev/null @@ -1,49 +0,0 @@ -@import '../../styles/mixins'; - -.ant-select-dropdown { - .scrollable-above::after { - top: 0; - bottom: unset; - background: linear-gradient(to bottom, rgb(255 255 255 / 100%), rgb(255 255 255 / 0%)); - - @extend %mixin-gradient-overlay; - } - - .scrollable-below::after { - @extend %mixin-gradient-overlay; - } -} - -.ant-select-selection-overflow-item { - .ant-tag { - display: flex; - flex: 0 0 auto; - align-items: center; - padding: 0 4px 0 8px; - margin: 1px 4px 1px 0; - overflow: hidden; - font-size: inherit; - line-height: inherit; - user-select: none; - background: #f5f5f5; - border: 1px solid #f0f0f0; - - .label { - overflow: hidden; - text-overflow: ellipsis; - } - - .btn-close { - margin-left: 4px; - font-size: 10px; - - .anticon-close { - color: rgb(0 0 0 / 45%); - - & :hover { - color: rgb(0 0 0 / 75%); - } - } - } - } -} diff --git a/frontend/src/lib/components/SelectGradientOverflow.tsx b/frontend/src/lib/components/SelectGradientOverflow.tsx deleted file mode 100644 index bbbcd2239cbaf..0000000000000 --- a/frontend/src/lib/components/SelectGradientOverflow.tsx +++ /dev/null @@ -1,177 +0,0 @@ -import './SelectGradientOverflow.scss' - -// eslint-disable-next-line no-restricted-imports -import { LoadingOutlined } from '@ant-design/icons' -import { LemonTag } from '@posthog/lemon-ui' -import { ConfigProvider, Empty, Select } from 'antd' -import { RefSelectProps, SelectProps } from 'antd/lib/select' -import { useValues } from 'kea' -import { Tooltip } from 'lib/lemon-ui/Tooltip' -import { ANTD_TOOLTIP_PLACEMENTS, toString } from 'lib/utils' -import { ReactElement, RefObject, useEffect, useRef, useState } from 'react' - -import { propertyDefinitionsModel } from '~/models/propertyDefinitionsModel' - -import { CloseButton } from './CloseButton' - -interface DropdownGradientRendererProps { - updateScrollGradient: () => void - innerRef: RefObject - menu: ReactElement -} - -function DropdownGradientRenderer({ - updateScrollGradient, - innerRef, - menu, -}: DropdownGradientRendererProps): JSX.Element { - useEffect(() => { - updateScrollGradient() - }) - return
{menu}
-} - -type CustomTagProps = Parameters['tagRender'], undefined>>[0] - -export type SelectGradientOverflowProps = SelectProps & { - delayBeforeAutoOpen?: number - dropdownMatchSelectWidth?: boolean | number - placement?: 'bottomLeft' | 'topLeft' // Dropdown placement (undefined = auto). See API at https://ant.design/components/dropdown - handleBlur?: () => void - propertyKey?: string -} - -/** - * Ant Design Select extended with a gradient overlay to indicate a scrollable list. - */ -export function SelectGradientOverflow({ - autoFocus = false, - defaultOpen = false, - delayBeforeAutoOpen, - dropdownMatchSelectWidth = true, - handleBlur = () => {}, - placement, - propertyKey, - ...props -}: SelectGradientOverflowProps): JSX.Element { - const selectRef: React.RefObject | null = useRef(null) - const containerRef: React.RefObject = useRef(null) - const dropdownRef = useRef(null) - const [isOpen, setOpen] = useState(false) - const { formatPropertyValueForDisplay } = useValues(propertyDefinitionsModel) - - /** - * Ant Design Tag with custom styling in .scss to match default style - */ - function CustomTag({ label, onClose, value }: CustomTagProps): JSX.Element { - // if this component is displaying a list of PropertyFilterValues it needs to format them for display - if (typeof label === 'string' && propertyKey) { - label = formatPropertyValueForDisplay(propertyKey, label) - } - return ( - - - {label} - - - - ) - } - - const updateScrollGradient = (): void => { - const dropdown = dropdownRef.current - if (!dropdown) { - return - } - const holder: HTMLDivElement | null = dropdown.querySelector('.rc-virtual-list-holder') - if (!holder) { - return - } - if (holder.scrollTop > 0) { - dropdown.classList.add('scrollable-above') - } else { - dropdown.classList.remove('scrollable-above') - } - if (holder.scrollHeight > holder.scrollTop + holder.offsetHeight) { - holder.classList.add('scrollable-below') - } else { - holder.classList.remove('scrollable-below') - } - } - - const onFocus: React.FocusEventHandler = (e) => { - props.onFocus?.(e) - setTimeout(() => setOpen(true), delayBeforeAutoOpen || 0) - } - - const onBlur: React.FocusEventHandler = (e) => { - props.onBlur?.(e) - if (isOpen) { - setOpen(false) - handleBlur() - } - } - - useEffect(() => { - if (autoFocus || defaultOpen) { - selectRef.current?.focus() - } - }, [autoFocus, defaultOpen]) - - const outsideClickListener = (event: any): void => { - if (!containerRef.current?.contains(event.target) && !dropdownRef.current?.contains(event.target) && isOpen) { - selectRef.current?.blur() - } - } - document.addEventListener('click', outsideClickListener) - - return ( -
- {/* - This config provider is used to configure the empty data state on the wrapped - ANT select component - */} - { - if (props.loading) { - return ( -
- -
Loading data
-
- ) - } else { - return ( -
- -
- ) - } - }} - > - -
-
- ) -} diff --git a/frontend/src/lib/lemon-ui/LemonInput/LemonInput.scss b/frontend/src/lib/lemon-ui/LemonInput/LemonInput.scss index 934cdaeb36254..f66e8cba409bf 100644 --- a/frontend/src/lib/lemon-ui/LemonInput/LemonInput.scss +++ b/frontend/src/lib/lemon-ui/LemonInput/LemonInput.scss @@ -58,6 +58,16 @@ transition: color 200ms ease; } + &.LemonInput--xsmall { + --lemon-input-height: 1.5rem; + + padding: 0.125rem 0.25rem; + + .LemonIcon { + font-size: 1rem; + } + } + &.LemonInput--small { --lemon-input-height: 2rem; diff --git a/frontend/src/lib/lemon-ui/LemonInput/LemonInput.tsx b/frontend/src/lib/lemon-ui/LemonInput/LemonInput.tsx index f65b8bb7b9ef1..9b4e1793ea2e4 100644 --- a/frontend/src/lib/lemon-ui/LemonInput/LemonInput.tsx +++ b/frontend/src/lib/lemon-ui/LemonInput/LemonInput.tsx @@ -8,7 +8,7 @@ import React, { useRef, useState } from 'react' interface LemonInputPropsBase extends Pick< - // NOTE: We explicitly pick rather than omit to ensure thes components aren't used incorrectly + // NOTE: We explicitly pick rather than omit to ensure these components aren't used incorrectly React.InputHTMLAttributes, | 'className' | 'onFocus' @@ -42,7 +42,7 @@ interface LemonInputPropsBase /** Special case - show a transparent background rather than white */ transparentBackground?: boolean /** Size of the element. Default: `'medium'`. */ - size?: 'small' | 'medium' + size?: 'xsmall' | 'small' | 'medium' onPressEnter?: (event: React.KeyboardEvent) => void 'data-attr'?: string 'aria-label'?: string diff --git a/frontend/src/lib/lemon-ui/LemonInputSelect/LemonInputSelect.tsx b/frontend/src/lib/lemon-ui/LemonInputSelect/LemonInputSelect.tsx index f3e39c46f1e11..4a9ec5e469cd1 100644 --- a/frontend/src/lib/lemon-ui/LemonInputSelect/LemonInputSelect.tsx +++ b/frontend/src/lib/lemon-ui/LemonInputSelect/LemonInputSelect.tsx @@ -7,7 +7,7 @@ import { KeyboardShortcut } from '~/layout/navigation-3000/components/KeyboardSh import { LemonButton } from '../LemonButton' import { LemonDropdown } from '../LemonDropdown' -import { LemonInput } from '../LemonInput' +import { LemonInput, LemonInputProps } from '../LemonInput' import { PopoverReferenceContext } from '../Popover' export interface LemonInputSelectOption { @@ -16,7 +16,11 @@ export interface LemonInputSelectOption { labelComponent?: React.ReactNode } -export type LemonInputSelectProps = { +export type LemonInputSelectProps = Pick< + // NOTE: We explicitly pick rather than omit to ensure these components aren't used incorrectly + LemonInputProps, + 'autoFocus' +> & { options?: LemonInputSelectOption[] value?: string[] | null disabled?: boolean @@ -26,6 +30,7 @@ export type LemonInputSelectProps = { mode: 'multiple' | 'single' allowCustomValues?: boolean onChange?: (newValue: string[]) => void + onBlur?: () => void onInputChange?: (newValue: string) => void 'data-attr'?: string } @@ -37,10 +42,12 @@ export function LemonInputSelect({ loading, onChange, onInputChange, + onBlur, mode, disabled, disableFiltering = false, allowCustomValues = false, + autoFocus = false, ...props }: LemonInputSelectProps): JSX.Element { const [showPopover, setShowPopover] = useState(false) @@ -132,6 +139,7 @@ export function LemonInputSelect({ setInputValue('') } setShowPopover(false) + onBlur?.() }, 100) } @@ -175,7 +183,7 @@ export function LemonInputSelect({ } return ( <> - _onActionItem(value)}> + _onActionItem(value)}> {option?.labelComponent ?? option?.label} @@ -262,6 +270,7 @@ export function LemonInputSelect({ onChange={setInputValue} onKeyDown={_onKeyDown} disabled={disabled} + autoFocus={autoFocus} /> diff --git a/frontend/src/lib/utils.tsx b/frontend/src/lib/utils.tsx index 0b3a50735fcc7..ab32f34b314f3 100644 --- a/frontend/src/lib/utils.tsx +++ b/frontend/src/lib/utils.tsx @@ -3,7 +3,6 @@ import equal from 'fast-deep-equal' import { tagColors } from 'lib/colors' import { WEBHOOK_SERVICES } from 'lib/constants' import { dayjs } from 'lib/dayjs' -import { AlignType } from 'rc-trigger/lib/interface' import { CSSProperties } from 'react' import { @@ -27,43 +26,6 @@ import { getAppContext } from './utils/getAppContext' * Preferably create a dedicated file in utils/.. */ -export const ANTD_TOOLTIP_PLACEMENTS: Record = { - // `@yiminghe/dom-align` objects - // https://github.com/react-component/select/blob/dade915d81069b8d3b3b5679bb9daee7e992faba/src/SelectTrigger.jsx#L11-L28 - bottomLeft: { - points: ['tl', 'bl'], - offset: [0, 4], - overflow: { - adjustX: 0, - adjustY: 0, - }, - }, - bottomRight: { - points: ['tr', 'br'], - offset: [0, 4], - overflow: { - adjustX: 0, - adjustY: 0, - }, - }, - topLeft: { - points: ['bl', 'tl'], - offset: [0, -4], - overflow: { - adjustX: 0, - adjustY: 0, - }, - }, - horizontalPreferRight: { - points: ['cl', 'cr'], - offset: [4, 0], - overflow: { - adjustX: true, - adjustY: false, - }, - }, -} - export function uuid(): string { return '10000000-1000-4000-8000-100000000000'.replace(/[018]/g, (c) => ( diff --git a/frontend/src/scenes/actions/ActionEdit.tsx b/frontend/src/scenes/actions/ActionEdit.tsx index 9da6187358372..a57d9590fc8a4 100644 --- a/frontend/src/scenes/actions/ActionEdit.tsx +++ b/frontend/src/scenes/actions/ActionEdit.tsx @@ -104,7 +104,7 @@ export function ActionEdit({ action: loadedAction, id }: ActionEditLogicProps): {({ value, onChange }) => ( onChange(newTags)} + onChange={(tags) => onChange(tags)} className="action-tags" saving={actionLoading} tagsAvailable={tags.filter((tag) => !action.tags?.includes(tag))} diff --git a/frontend/src/scenes/dashboard/DashboardHeader.tsx b/frontend/src/scenes/dashboard/DashboardHeader.tsx index 231b3516f4674..bd9891dd6c8a1 100644 --- a/frontend/src/scenes/dashboard/DashboardHeader.tsx +++ b/frontend/src/scenes/dashboard/DashboardHeader.tsx @@ -324,7 +324,7 @@ export function DashboardHeader(): JSX.Element | null { {canEditDashboard ? ( triggerDashboardUpdate({ tags })} + onChange={(tags) => triggerDashboardUpdate({ tags })} saving={dashboardLoading} tagsAvailable={tags.filter((tag) => !dashboard.tags?.includes(tag))} className="mt-2" diff --git a/frontend/src/scenes/data-management/definition/DefinitionEdit.tsx b/frontend/src/scenes/data-management/definition/DefinitionEdit.tsx index 0024158a62b24..b2198239839d6 100644 --- a/frontend/src/scenes/data-management/definition/DefinitionEdit.tsx +++ b/frontend/src/scenes/data-management/definition/DefinitionEdit.tsx @@ -93,7 +93,7 @@ export function DefinitionEdit(props: DefinitionLogicProps = {}): JSX.Element { className="definition-tags" saving={definitionLoading || tagsLoading} tags={value || []} - onChange={(_, tags) => onChange(tags)} + onChange={(tags) => onChange(tags)} style={{ marginBottom: 4 }} tagsAvailable={tags} /> diff --git a/frontend/src/scenes/feature-flags/FeatureFlag.tsx b/frontend/src/scenes/feature-flags/FeatureFlag.tsx index 0905db1420fa4..83036f92f7b1f 100644 --- a/frontend/src/scenes/feature-flags/FeatureFlag.tsx +++ b/frontend/src/scenes/feature-flags/FeatureFlag.tsx @@ -350,7 +350,7 @@ export function FeatureFlag({ id }: { id?: string } = {}): JSX.Element { onChange(tags)} + onChange={(tags) => onChange(tags)} tagsAvailable={tags.filter( (tag) => !featureFlag.tags?.includes(tag) )} @@ -498,7 +498,7 @@ export function FeatureFlag({ id }: { id?: string } = {}): JSX.Element { {featureFlag.can_edit ? ( { + onChange={(tags) => { // TODO: Use an existing function instead of this new one for updates triggerFeatureFlagUpdate({ tags }) }} diff --git a/frontend/src/styles/global.scss b/frontend/src/styles/global.scss index 1eece277c80c7..b0188572c656d 100644 --- a/frontend/src/styles/global.scss +++ b/frontend/src/styles/global.scss @@ -268,10 +268,6 @@ input::-ms-clear { // Button styles -.btn-close { - color: var(--muted); -} - .info-indicator { margin-left: 4px; color: var(--primary-alt) !important; @@ -289,16 +285,6 @@ input::-ms-clear { line-height: 0; } -.btn-lg-2x { - font-size: 1.5rem !important; - line-height: 1 !important; - - svg { - width: 1.5rem !important; - height: 1.5rem !important; - } -} - // Graph series glyph .graph-series-glyph {