Fix/record group index and seed (#9605)

- [x] [Disable group by on default view Options
menu](https://discord.com/channels/1130383047699738754/1328421803399446568)
- [x] Add default seed for view group
This commit is contained in:
Jérémy M
2025-01-15 09:37:15 +01:00
committed by GitHub
parent 1a5b3ef2f8
commit eaa68424f5
12 changed files with 393 additions and 143 deletions

View File

@ -16,7 +16,7 @@ export enum TooltipDelay {
mediumDelay = '500ms',
}
const StyledAppTooltip = styled(Tooltip)`
const StyledAppTooltip = styled(Tooltip)<{ width?: string }>`
backdrop-filter: ${({ theme }) => theme.blur.strong};
background-color: ${({ theme }) => RGBA(theme.color.gray80, 0.8)};
border-radius: ${({ theme }) => theme.border.radius.sm};
@ -27,7 +27,7 @@ const StyledAppTooltip = styled(Tooltip)`
font-size: ${({ theme }) => theme.font.size.sm};
font-weight: ${({ theme }) => theme.font.weight.regular};
max-width: 40%;
max-width: ${({ width }) => width || '40%'};
overflow: visible;
padding: ${({ theme }) => theme.spacing(2)};
@ -49,6 +49,7 @@ export type AppTooltipProps = {
delay?: TooltipDelay;
positionStrategy?: PositionStrategy;
clickable?: boolean;
width?: string;
};
export const AppTooltip = ({
@ -63,6 +64,7 @@ export const AppTooltip = ({
positionStrategy,
children,
clickable,
width,
}: AppTooltipProps) => {
const delayInMs =
delay === TooltipDelay.noDelay
@ -86,6 +88,7 @@ export const AppTooltip = ({
positionStrategy,
children,
clickable,
width,
}}
/>
);

View File

@ -102,6 +102,48 @@ export const Hoverable: Story = {
),
};
export const WithWidth: Story = {
args: {
place: TooltipPosition.Top,
delay: TooltipDelay.mediumDelay,
content: 'Tooltip with custom width',
hidden: false,
anchorSelect: '#width-text',
width: '200px',
},
decorators: [ComponentDecorator],
render: ({
anchorSelect,
className,
content,
delay,
noArrow,
offset,
place,
positionStrategy,
width,
}) => (
<>
<p id="width-text" data-testid="tooltip">
Hover me to see custom width!
</p>
<Tooltip
{...{
anchorSelect,
className,
content,
delay,
noArrow,
offset,
place,
positionStrategy,
width,
}}
/>
</>
),
};
export const Catalog: CatalogStory<Story, typeof Tooltip> = {
args: { hidden: false, content: 'Tooltip Test' },
play: async ({ canvasElement }) => {