mirror of https://github.com/buster-so/buster.git
truncate metric headers and values
This commit is contained in:
parent
75e5c1ec4b
commit
f4c2515f25
|
@ -208,7 +208,7 @@ const AnimatedTitleWrapper = ({ title, type }: { title: string; type: 'header' |
|
|||
return (
|
||||
<AnimatePresence mode="wait" initial={false}>
|
||||
{title && (
|
||||
<motion.div className="overflow-visible" {...memoizedAnimation}>
|
||||
<motion.div className="w-full overflow-visible text-center" {...memoizedAnimation}>
|
||||
<motion.div className="origin-center">
|
||||
<Title truncate as="h4">
|
||||
{title}
|
||||
|
|
|
@ -190,3 +190,25 @@ export const CustomValueLabel: Story = {
|
|||
</div>
|
||||
)
|
||||
};
|
||||
|
||||
export const WithLongTextValue: Story = {
|
||||
args: {
|
||||
data: [{ value: 'This is a long text value that should be wrapped' }],
|
||||
metricColumnId: 'value',
|
||||
columnLabelFormats: {
|
||||
value: {
|
||||
...DEFAULT_COLUMN_LABEL_FORMAT,
|
||||
columnType: 'text',
|
||||
style: 'string'
|
||||
} as ColumnLabelFormat
|
||||
},
|
||||
metricHeader: 'Long Text Value that is like really long',
|
||||
metricSubHeader: 'This is a long text value that should be wrapped',
|
||||
animate: true
|
||||
},
|
||||
render: (args) => (
|
||||
<div className="w-80vw h-[200px] rounded-md border border-red-500 p-4">
|
||||
<BusterMetricChart {...args} />
|
||||
</div>
|
||||
)
|
||||
};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { z } from "zod/v4";
|
||||
import { ShareRoleSchema, VerificationStatusSchema } from "../share";
|
||||
import { ChartConfigPropsSchema } from "./charts";
|
||||
import { z } from 'zod/v4';
|
||||
import { ShareRoleSchema, VerificationStatusSchema } from '../share';
|
||||
import { ChartConfigPropsSchema } from './charts';
|
||||
|
||||
export const GetMetricRequestSchema = z.object({
|
||||
id: z.string(),
|
||||
|
@ -81,9 +81,7 @@ export type GetMetricRequest = z.infer<typeof GetMetricRequestSchema>;
|
|||
export type GetMetricListRequest = z.infer<typeof GetMetricListRequestSchema>;
|
||||
export type UpdateMetricRequest = z.infer<typeof UpdateMetricRequestSchema>;
|
||||
export type DeleteMetricRequest = z.infer<typeof DeleteMetricRequestSchema>;
|
||||
export type DuplicateMetricRequest = z.infer<
|
||||
typeof DuplicateMetricRequestSchema
|
||||
>;
|
||||
export type DuplicateMetricRequest = z.infer<typeof DuplicateMetricRequestSchema>;
|
||||
export type BulkUpdateMetricVerificationStatusRequest = z.infer<
|
||||
typeof BulkUpdateMetricVerificationStatusRequestSchema
|
||||
>;
|
||||
|
|
Loading…
Reference in New Issue