Skip to content

The open alternative to Salesforce, designed for AI.

Restore light join word in keyboard shortcuts (#29275)

Thomas des Francs7693a692ce3f
diff --git a/packages/twenty-ui/src/components/__stories__/LabelOverrides.stories.tsx b/packages/twenty-ui/src/components/__stories__/LabelOverrides.stories.tsx
index 2ab8368013a..f6bfdf26019 100644
--- a/packages/twenty-ui/src/components/__stories__/LabelOverrides.stories.tsx
+++ b/packages/twenty-ui/src/components/__stories__/LabelOverrides.stories.tsx
@@ -126,7 +126,17 @@ export const NativeNames: Story = {
};
export const DropdownShortcutLabels: Story = {
- parameters: { a11y: DROPDOWN_STORY_A11Y_PARAMETERS },
+ parameters: {
+ a11y: {
+ ...A11Y_DEFER_COLOR_CONTRAST,
+ config: {
+ rules: [
+ ...DROPDOWN_STORY_A11Y_PARAMETERS.config.rules,
+ ...A11Y_DEFER_COLOR_CONTRAST.config.rules,
+ ],
+ },
+ },
+ },
render: () => (
<Dropdown.Root type="menu">
<Dropdown.Trigger render={<Button>Open shortcuts</Button>} />
diff --git a/packages/twenty-ui/src/components/navigation/ListItemButton/__stories__/ListItemButtonInteractions.stories.tsx b/packages/twenty-ui/src/components/navigation/ListItemButton/__stories__/ListItemButtonInteractions.stories.tsx
index 22877d6876c..5d46c17c608 100644
--- a/packages/twenty-ui/src/components/navigation/ListItemButton/__stories__/ListItemButtonInteractions.stories.tsx
+++ b/packages/twenty-ui/src/components/navigation/ListItemButton/__stories__/ListItemButtonInteractions.stories.tsx
@@ -2,7 +2,7 @@ import { type Meta, type StoryObj } from '@storybook/react-vite';
import { ListItemButton } from '@ui/components/navigation/ListItemButton/ListItemButton';
import { Button } from '@ui/primitives/input/Button/Button';
import { Avatar } from '@ui/primitives/data-display/Avatar/Avatar';
-import { ComponentDecorator } from '@ui/testing';
+import { A11Y_DEFER_COLOR_CONTRAST, ComponentDecorator } from '@ui/testing';
import { isDefined } from '@ui/utilities/utils/isDefined';
import { expect, fn, userEvent, within } from 'storybook/test';
@@ -16,6 +16,7 @@ const meta: Meta<typeof ListItemButton> = {
title: 'UI/Components/Navigation/ListItemButton/Interactions',
component: ListItemButton,
decorators: [ComponentDecorator],
+ parameters: { a11y: A11Y_DEFER_COLOR_CONTRAST },
tags: ['!autodocs'],
args: { children: 'Open record', onClick: fn(), style: ROW_STYLE },
};
diff --git a/packages/twenty-ui/src/primitives/typography/Shortcut/Shortcut.module.scss b/packages/twenty-ui/src/primitives/typography/Shortcut/Shortcut.module.scss
index cc392517d0e..745f2586a67 100644
--- a/packages/twenty-ui/src/primitives/typography/Shortcut/Shortcut.module.scss
+++ b/packages/twenty-ui/src/primitives/typography/Shortcut/Shortcut.module.scss
@@ -35,6 +35,10 @@
gap: var(--t-spacing-1);
}
+.sequenceJoinLabel {
+ color: var(--t-font-color-light);
+}
+
.key {
align-items: center;
background-color: var(--t-background-secondary);
diff --git a/packages/twenty-ui/src/primitives/typography/Shortcut/Shortcut.tsx b/packages/twenty-ui/src/primitives/typography/Shortcut/Shortcut.tsx
index 5be6e635f3f..95d07ca8520 100644
--- a/packages/twenty-ui/src/primitives/typography/Shortcut/Shortcut.tsx
+++ b/packages/twenty-ui/src/primitives/typography/Shortcut/Shortcut.tsx
@@ -50,7 +50,9 @@ export const Shortcut = ({
: presentation.groups.map((keys, stepIndex) => (
<Fragment key={stepIndex}>
{stepIndex > 0 && (
- <span>{` ${presentation.sequenceJoinLabel} `}</span>
+ <span className={styles.sequenceJoinLabel}>
+ {` ${presentation.sequenceJoinLabel} `}
+ </span>
)}
<span className={styles.combination}>
{keys.map((key, keyIndex) => (
diff --git a/packages/twenty-ui/src/primitives/typography/Shortcut/__stories__/Shortcut.stories.tsx b/packages/twenty-ui/src/primitives/typography/Shortcut/__stories__/Shortcut.stories.tsx
index 120c5606677..860f8af5be9 100644
--- a/packages/twenty-ui/src/primitives/typography/Shortcut/__stories__/Shortcut.stories.tsx
+++ b/packages/twenty-ui/src/primitives/typography/Shortcut/__stories__/Shortcut.stories.tsx
@@ -4,13 +4,18 @@ import { expect, within } from 'storybook/test';
import { Button } from '@ui/primitives/input';
import { ListItem } from '@ui/primitives/navigation';
import { Shortcut, Text, formatShortcut } from '@ui/primitives/typography';
-import { ComponentDecorator, overrideMediaQueryMatches } from '@ui/testing';
+import {
+ A11Y_DEFER_COLOR_CONTRAST,
+ ComponentDecorator,
+ overrideMediaQueryMatches,
+} from '@ui/testing';
import { MOBILE_MEDIA_QUERY } from '@ui/utilities';
const meta: Meta<typeof Shortcut> = {
title: 'UI/Typography/Shortcut',
component: Shortcut,
decorators: [ComponentDecorator],
+ parameters: { a11y: A11Y_DEFER_COLOR_CONTRAST },
args: {
shortcut: ['Mod', 'K'],
platform: 'mac',