Repository navigation
Commit d0ffa51
committed
Replace prompt type dropdown with prompt type buttons in header
- instead of 'ui prompt type dropdown', place 'prompt type button', for 'edit' use icon "edit-sparkle", for 'ask' use "chat-sparkle"
- 'edit' should use 'bg green', ask should use 'bg orange'
- implement compacting of 'ask'/'edit'
- which one gets compacted first, 'ask' or 'edit'? the one that is not active should get compacted first
- remove compacting from promp type buttons
- don't just Object. entries, place prompt type buttons statically
- non-active prompt type should compact first
- compacting in `apps/editor/src/views/prompt/frontend/Main/MainView/components/Header/Header.tsx` doesn't work
- remove unused styles
- because of the way how we handle 'home'/'main' views, compacting on the initially hidden view ('main') doesn't work
- fix label={'xxxxxxxxxxxxxxxxx'}
- 'prompt type button' should not have background prop. make it only var(--vscode-toolbar-hoverBackground); on hover (transparent when not hovered)
- swap 'prompt type' with 'mode' buttons
- wrap 'prompt type' buttons in a div without gap
- in `packages/ui/src/components/editor/prompt/PromptTypeButton/PromptTypeButton.tsx` implement 'keycap', inspired by 'esc'. shown with filled prop 'keycap_char'
- new keyboard shortcuts: 'Edit' prompt type: 'alt+E', 'Ask prompt type: 'alt+A'
- keycap should never be dimmed
- in main, remove hover background from 'chatbots'/'api calls' button, make it animate on hover with a wave animation
- on mode hover, building on the current animation, progrssively move the whole thing up so the other mode in a dimmed color appears, hover out - reverse operation, unless clicked
- the other mode is visible under the current one, should not
- remove wave animation
- chatbots/api calls should stick to each other, though make the stickiness only visible during animation
├── apps
│ └── editor
│ └── src
│ └── views
│ └── prompt
│ └── frontend
│ ├── Home
│ │ ├── Home.module.scss
│ │ ├── Home.tsx
│ │ ├── hooks
│ │ │ ├── use-has-scrolled-past-mode-button.ts
│ │ │ └── use-tasks.ts
│ │ └── index.ts
│ ├── Main
│ │ ├── Main.tsx
│ │ ├── MainView
│ │ │ ├── MainView.module.scss
│ │ │ ├── MainView.tsx
│ │ │ ├── components
│ │ │ │ └── Header
│ │ │ │ ├── Header.module.scss
│ │ │ │ ├── Header.tsx
│ │ │ │ ├── hooks
│ │ │ │ │ └── use-keyboard-shortcuts.ts
│ │ │ │ └── index.ts
│ │ │ ├── hooks
│ │ │ │ ├── use-invocation-counts.ts
│ │ │ │ ├── use-last-choice-tooltip.ts
│ │ │ │ └── use-re-render-on-interval.ts
│ │ │ ├── index.ts
│ │ │ └── prompt-type-labels.ts
│ │ └── index.ts
│ ├── Prompt.tsx
│ ├── components
│ │ ├── Layout
│ │ │ └── Footer
│ │ │ ├── Footer.tsx
│ │ │ └── index.ts
│ │ └── recent-donations
│ │ └── RecentDonationsFooter
│ │ └── RecentDonationsFooter.tsx
│ └── hooks
│ └── use-prompt
│ └── use-prompt.ts
└── packages
├── shared
│ └── src
│ └── hooks
│ └── use-compacting.ts
└── ui
└── src
├── components
│ └── editor
│ └── prompt
│ ├── BrowserExtensionMessage
│ │ └── BrowserExtensionMessage.tsx
│ ├── CompactableActionButton
│ │ ├── CompactableActionButton.module.scss
│ │ ├── CompactableActionButton.tsx
│ │ └── index.ts
│ ├── ModeButton
│ │ ├── ModeButton.module.scss
│ │ ├── ModeButton.stories.tsx
│ │ ├── ModeButton.tsx
│ │ └── index.ts
│ ├── PromptTypeButton
│ │ ├── PromptTypeButton.module.scss
│ │ ├── PromptTypeButton.stories.tsx
│ │ ├── PromptTypeButton.tsx
│ │ └── index.ts
│ ├── PromptTypeDropdown
│ │ ├── PromptTypeDropdown.module.scss
│ │ ├── PromptTypeDropdown.stories.tsx
│ │ ├── PromptTypeDropdown.tsx
│ │ └── index.ts
│ └── ResponsePreviewFooter
│ └── ResponsePreviewFooter.tsx
├── constants
│ └── sizes.ts
└── styles
└── foundation
└── _colors.scss1 parent 584e0bd commit d0ffa51
17 files changed
Lines changed: 380 additions & 291 deletions
File tree
- apps/editor/src/views/prompt/frontend
- Main/MainView
- components/Header
- hooks
- packages
- ui/src/components/editor/prompt
- CompactableActionButton
- PromptTypeButton
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | 1 | | |
19 | 2 | | |
20 | 3 | | |
| |||
26 | 9 | | |
27 | 10 | | |
28 | 11 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | 12 | | |
42 | 13 | | |
43 | 14 | | |
44 | 15 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
5 | | - | |
| 6 | + | |
6 | 7 | | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | | - | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
15 | | - | |
| 17 | + | |
16 | 18 | | |
17 | | - | |
18 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
19 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
20 | 29 | | |
21 | 30 | | |
22 | 31 | | |
23 | 32 | | |
24 | 33 | | |
| 34 | + | |
25 | 35 | | |
26 | | - | |
27 | | - | |
| 36 | + | |
| 37 | + | |
28 | 38 | | |
29 | 39 | | |
30 | 40 | | |
| |||
33 | 43 | | |
34 | 44 | | |
35 | 45 | | |
| 46 | + | |
36 | 47 | | |
37 | 48 | | |
38 | 49 | | |
39 | 50 | | |
40 | 51 | | |
41 | | - | |
42 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
43 | 103 | | |
44 | 104 | | |
45 | 105 | | |
| |||
58 | 118 | | |
59 | 119 | | |
60 | 120 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | 121 | | |
0 commit comments