mirror of https://github.com/buster-so/buster.git
Merge pull request #1171 from buster-so/big-nate-bus-1957-inherit-color-toggle-on-linear-trend-line-is-janky
element size update
This commit is contained in:
commit
b069d1a8a1
|
@ -10,6 +10,8 @@ import { motion } from 'framer-motion';
|
|||
import * as React from 'react';
|
||||
import { useEffect, useLayoutEffect, useState, useTransition } from 'react';
|
||||
import { useIsBlockerEnabled } from '@/context/Routes/blocker-store';
|
||||
import { useDebounce } from '@/hooks/useDebounce';
|
||||
import { useMount } from '@/hooks/useMount';
|
||||
import { useSize } from '@/hooks/useSize';
|
||||
import { cn } from '@/lib/classMerge';
|
||||
import type { ILinkProps } from '@/types/routes';
|
||||
|
@ -142,7 +144,8 @@ export const AppSegmented: AppSegmentedComponent = (<
|
|||
}: AppSegmentedProps<T, TRouter, TOptions, TFrom>) => {
|
||||
const { blocker } = useIsBlockerEnabled();
|
||||
const rootRef = React.useRef<HTMLDivElement>(null);
|
||||
const elementSize = useSize(rootRef, 25);
|
||||
const rawElementSize = useSize(rootRef, 25);
|
||||
const elementSize = useDebounce(rawElementSize, { wait: 25 });
|
||||
const tabRefs = React.useRef<Map<string, HTMLButtonElement>>(new Map());
|
||||
const [selectedValue, setSelectedValue] = useState(value || options[0]?.value);
|
||||
const [gliderStyle, setGliderStyle] = useState({
|
||||
|
|
|
@ -6,7 +6,7 @@ export const MetricEditController: React.FC<{
|
|||
metricVersionNumber: number | undefined;
|
||||
}> = React.memo(({ metricId, metricVersionNumber }) => {
|
||||
return (
|
||||
<div className="flex h-full w-full min-w-[260px] flex-col overflow-hidden">
|
||||
<div className="flex h-full w-full min-w-[250px] flex-col overflow-hidden">
|
||||
<MetricStylingApp metricId={metricId} metricVersionNumber={metricVersionNumber} />
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -13,7 +13,7 @@ export const LabelAndInput: React.FC<{
|
|||
return (
|
||||
<div
|
||||
data-testid={dataTestId}
|
||||
className={cn('grid w-full grid-cols-[minmax(115px,115px)_1fr] items-center gap-2', 'h-7')}
|
||||
className={cn('grid w-full grid-cols-[minmax(35px,115px)_1fr] items-center gap-2 h-7')}
|
||||
>
|
||||
<div className="flex items-center gap-x-1">
|
||||
<Text size="sm" variant="secondary">
|
||||
|
|
Loading…
Reference in New Issue