Skip to content

Commit dca95f9

Browse files
committed
Add plus prefix and update underline styling for edit format selector button
- prefix edit format with "+" - in edit format instruction, don't underline the "+ " prefix └── packages └── ui └── src └── components └── editor └── common └── prompts ├── PromptField │ ├── PromptField.module.scss │ ├── PromptField.stories.tsx │ ├── PromptField.tsx │ ├── hooks │ │ ├── use-drag-drop.ts │ │ ├── use-dropdown.ts │ │ ├── use-ghost-text.ts │ │ ├── use-handlers │ │ │ ├── handle-copy.ts │ │ │ ├── handle-cut.ts │ │ │ ├── handle-input-change.ts │ │ │ ├── handle-input-click.ts │ │ │ ├── handle-key-down.ts │ │ │ ├── handle-paste.ts │ │ │ ├── handle-submit.ts │ │ │ ├── index.ts │ │ │ ├── types.ts │ │ │ ├── use-handlers.ts │ │ │ └── utils.ts │ │ └── use-keyboard-shortcuts.ts │ └── index.ts ├── Template │ ├── Template.module.scss │ ├── Template.tsx │ └── index.ts └── shared └── symbols ├── caret.ts ├── get-highlighted-text.tsx ├── index.ts ├── position-mapping.ts ├── prompt-symbols.module.scss ├── reconstruct-raw-value.ts └── use-symbol-deletion.ts
1 parent 0fa5258 commit dca95f9

2 files changed

Lines changed: 21 additions & 10 deletions

File tree

‎packages/ui/src/components/editor/common/prompts/PromptField/PromptField.module.scss‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,19 +176,21 @@
176176
white-space: nowrap;
177177
overflow: hidden;
178178
text-overflow: ellipsis;
179-
text-decoration: underline dotted;
180-
text-underline-offset: 4px;
181179

182180
&:hover {
183181
opacity: 1;
184182
}
185183

186184
&--alt-pressed {
187-
text-decoration: none;
188185
opacity: 1;
189186
}
190187
}
191188

189+
&__text {
190+
text-decoration: underline dotted;
191+
text-underline-offset: 4px;
192+
}
193+
192194
&__keycaps {
193195
display: flex;
194196
gap: 6px;

‎packages/ui/src/components/editor/common/prompts/PromptField/PromptField.tsx‎

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -639,13 +639,22 @@ export const PromptField: React.FC<PromptFieldProps> = (props) => {
639639
</KeycapWrapper>
640640
</span>
641641
) : (
642-
{
643-
whole: props.translations.edit_format_whole,
644-
'search-replace':
645-
props.translations.edit_format_search_replace,
646-
diff: props.translations.edit_format_diff,
647-
truncated: props.translations.edit_format_truncated
648-
}[props.edit_format as EditFormat]
642+
<>
643+
+{' '}
644+
<span
645+
className={styles['footer__right__edit-format__text']}
646+
>
647+
{
648+
{
649+
whole: props.translations.edit_format_whole,
650+
'search-replace':
651+
props.translations.edit_format_search_replace,
652+
diff: props.translations.edit_format_diff,
653+
truncated: props.translations.edit_format_truncated
654+
}[props.edit_format as EditFormat]
655+
}
656+
</span>
657+
</>
649658
)}
650659
</button>
651660
</div>

0 commit comments

Comments
 (0)