Skip to content

Commit b4585b0

Browse files
committed
fix(frontend): fold hint line inside chat input container (M6.5)
Move the 'Enter to send · Shift + Enter for new line' hint from below the bordered input box to inside it. Unifies the block visually and removes the empty space that remained at the bottom of the drawer.
1 parent 5411909 commit b4585b0

1 file changed

Lines changed: 30 additions & 28 deletions

File tree

frontend/src/app/chat/ChatInput.tsx

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -67,36 +67,38 @@ export const ChatInput = forwardRef<ChatInputHandle, ChatInputProps>(function Ch
6767
e.preventDefault();
6868
submit();
6969
}}
70-
className="border-t border-[var(--ds-border)] bg-[var(--ds-bg-surface)] px-3 pt-2.5 pb-2"
70+
className="border-t border-[var(--ds-border)] bg-[var(--ds-bg-surface)] px-3 py-2"
7171
>
72-
<div className="flex items-end gap-2 rounded-[var(--ds-radius-md)] border border-[var(--ds-border)] bg-[var(--ds-bg-elevated)] px-3 py-2 transition-colors duration-[var(--ds-motion-fast)] focus-within:border-[var(--ds-border-strong)] focus-within:ring-2 focus-within:ring-[var(--ds-accent-ring)]">
73-
<textarea
74-
ref={textareaRef}
75-
value={value}
76-
onChange={(e) => {
77-
setValue(e.target.value);
78-
autoResize(e.target);
79-
}}
80-
onKeyDown={onKeyDown}
81-
placeholder={placeholder}
82-
disabled={disabled}
83-
rows={1}
84-
spellCheck
85-
aria-label="Message input"
86-
className="min-h-[20px] flex-1 resize-none bg-transparent text-[var(--ds-text-sm)] leading-[1.4] text-[var(--ds-fg-primary)] placeholder:text-[var(--ds-fg-subtle)] focus:outline-none disabled:opacity-50"
87-
/>
88-
<button
89-
type="submit"
90-
disabled={!canSubmit}
91-
aria-label="Send message"
92-
className="inline-flex h-7 w-7 flex-none items-center justify-center rounded-[var(--ds-radius-sm)] bg-[var(--ds-accent)] text-[var(--ds-accent-fg)] transition-colors duration-[var(--ds-motion-fast)] hover:bg-[var(--ds-accent-hover)] disabled:cursor-not-allowed disabled:bg-[var(--ds-bg-hover)] disabled:text-[var(--ds-fg-subtle)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ds-accent-ring)]"
93-
>
94-
<Icons.ArrowRight className="size-3.5" />
95-
</button>
72+
<div className="rounded-[var(--ds-radius-md)] border border-[var(--ds-border)] bg-[var(--ds-bg-elevated)] transition-colors duration-[var(--ds-motion-fast)] focus-within:border-[var(--ds-border-strong)] focus-within:ring-2 focus-within:ring-[var(--ds-accent-ring)]">
73+
<div className="flex items-end gap-2 px-3 pt-2">
74+
<textarea
75+
ref={textareaRef}
76+
value={value}
77+
onChange={(e) => {
78+
setValue(e.target.value);
79+
autoResize(e.target);
80+
}}
81+
onKeyDown={onKeyDown}
82+
placeholder={placeholder}
83+
disabled={disabled}
84+
rows={1}
85+
spellCheck
86+
aria-label="Message input"
87+
className="min-h-[20px] flex-1 resize-none bg-transparent text-[var(--ds-text-sm)] leading-[1.4] text-[var(--ds-fg-primary)] placeholder:text-[var(--ds-fg-subtle)] focus:outline-none disabled:opacity-50"
88+
/>
89+
<button
90+
type="submit"
91+
disabled={!canSubmit}
92+
aria-label="Send message"
93+
className="inline-flex h-7 w-7 flex-none items-center justify-center rounded-[var(--ds-radius-sm)] bg-[var(--ds-accent)] text-[var(--ds-accent-fg)] transition-colors duration-[var(--ds-motion-fast)] hover:bg-[var(--ds-accent-hover)] disabled:cursor-not-allowed disabled:bg-[var(--ds-bg-hover)] disabled:text-[var(--ds-fg-subtle)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ds-accent-ring)]"
94+
>
95+
<Icons.ArrowRight className="size-3.5" />
96+
</button>
97+
</div>
98+
<p className="px-3 pb-1.5 pt-1 text-[var(--ds-text-xs)] text-[var(--ds-fg-subtle)]">
99+
Enter to send · Shift + Enter for new line
100+
</p>
96101
</div>
97-
<p className="mt-1 text-[var(--ds-text-xs)] text-[var(--ds-fg-subtle)]">
98-
Enter to send · Shift + Enter for new line
99-
</p>
100102
</form>
101103
);
102104
});

0 commit comments

Comments
 (0)