Skip to content

Commit b727ac1

Browse files
committed
fix(web): scope skill label optical alignment
1 parent 7865726 commit b727ac1

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎apps/web/src/components/ComposerPromptEditor.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ import { cn, isMacPlatform } from "~/lib/utils";
7272
import { basenameOfPath } from "~/pierre-icons";
7373
import {
7474
COMPOSER_INLINE_CHIP_ICON_CLASS_NAME,
75-
COMPOSER_INLINE_CHIP_LABEL_CLASS_NAME,
7675
COMPOSER_INLINE_SKILL_CHIP_CLASS_NAME,
76+
COMPOSER_INLINE_SKILL_CHIP_LABEL_CLASS_NAME,
7777
SKILL_CHIP_ICON_SVG,
7878
} from "./composerInlineChip";
7979
import { FILE_TAG_CHIP_CLASS_NAME, FileTagChipContent } from "./chat/FileTagChip";
@@ -256,7 +256,7 @@ function ComposerSkillDecorator(props: { skillLabel: string; skillDescription: s
256256
className={COMPOSER_INLINE_CHIP_ICON_CLASS_NAME}
257257
dangerouslySetInnerHTML={{ __html: SKILL_CHIP_ICON_SVG }}
258258
/>
259-
<span className={COMPOSER_INLINE_CHIP_LABEL_CLASS_NAME}>{props.skillLabel}</span>
259+
<span className={COMPOSER_INLINE_SKILL_CHIP_LABEL_CLASS_NAME}>{props.skillLabel}</span>
260260
</span>
261261
);
262262

‎apps/web/src/components/composerInlineChip.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ export const COMPOSER_INLINE_CHIP_ICON_CLASS_NAME = "size-[1.17em] shrink-0 opac
1212

1313
export const CHAT_INLINE_CHIP_LABEL_CLASS_NAME = "truncate leading-tight";
1414

15-
// The composer label is smaller than the surrounding prompt text; offset its
15+
export const COMPOSER_INLINE_CHIP_LABEL_CLASS_NAME = `${CHAT_INLINE_CHIP_LABEL_CLASS_NAME} select-none`;
16+
17+
// The skill label is smaller than the surrounding prompt text; offset its
1618
// glyphs without moving the pill box or changing the editor's line height.
17-
export const COMPOSER_INLINE_CHIP_LABEL_CLASS_NAME = `${CHAT_INLINE_CHIP_LABEL_CLASS_NAME} relative top-[0.15em] select-none`;
19+
export const COMPOSER_INLINE_SKILL_CHIP_LABEL_CLASS_NAME = `${COMPOSER_INLINE_CHIP_LABEL_CLASS_NAME} relative top-[0.15em]`;
1820

1921
export const COMPOSER_INLINE_SKILL_CHIP_CLASS_NAME =
2022
"inline-flex max-w-full select-none items-center gap-[0.33em] rounded-[0.5em] border border-fuchsia-500/25 bg-fuchsia-500/12 px-[0.5em] py-[0.08em] font-medium text-[0.86em] leading-[1.1] text-fuchsia-700 align-middle dark:text-fuchsia-300";

0 commit comments

Comments
 (0)