Repository navigation
Commit 081dce5
committed
Simplify PromptField disabled state management and clean up tooltips
- unify props [Pasted text] in a single prop
- 'is action disabled' should disable the primary submit button
- from tooltips, remove shortcuts
├── apps
│ └── editor
│ └── src
│ └── views
│ └── prompt
│ └── frontend
│ └── Main
│ └── MainView
│ └── MainView.tsx
└── 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.ts1 parent 309f069 commit 081dce5
2 files changed
Lines changed: 5 additions & 22 deletions
File tree
- apps/editor/src/views/prompt/frontend/Main/MainView
- packages/ui/src/components/editor/common/prompts/PromptField
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
342 | 342 | | |
343 | 343 | | |
344 | 344 | | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
| 345 | + | |
357 | 346 | | |
358 | 347 | | |
359 | 348 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
| |||
382 | 381 | | |
383 | 382 | | |
384 | 383 | | |
385 | | - | |
| 384 | + | |
386 | 385 | | |
387 | 386 | | |
388 | 387 | | |
| |||
418 | 417 | | |
419 | 418 | | |
420 | 419 | | |
421 | | - | |
| 420 | + | |
422 | 421 | | |
423 | 422 | | |
424 | 423 | | |
| |||
477 | 476 | | |
478 | 477 | | |
479 | 478 | | |
480 | | - | |
481 | 479 | | |
482 | 480 | | |
483 | 481 | | |
| |||
541 | 539 | | |
542 | 540 | | |
543 | 541 | | |
544 | | - | |
545 | 542 | | |
546 | 543 | | |
547 | 544 | | |
| |||
671 | 668 | | |
672 | 669 | | |
673 | 670 | | |
674 | | - | |
675 | | - | |
676 | | - | |
677 | | - | |
678 | | - | |
| 671 | + | |
679 | 672 | | |
680 | 673 | | |
681 | 674 | | |
| |||
749 | 742 | | |
750 | 743 | | |
751 | 744 | | |
| 745 | + | |
752 | 746 | | |
753 | 747 | | |
754 | 748 | | |
| |||
0 commit comments