Repository navigation
Commit 9d9ce02
committed
Add reusable StatusBar component and migrate view and file item status messages to use it
- create 'StatusBar' component with icon, label, actions, etc. that consolidate various present components or their parts (it should be configurable enough to fully replace `packages/ui/src/components/editor/prompt/PromptAttachments/PromptAttachments.tsx` `packages/ui/src/components/editor/prompt/BrowserConnectionStatus/BrowserConnectionStatus.tsx` and be used in `packages/ui/src/components/editor/prompt/ResponsePreview/components/FileItem/FileItem.tsx`
- when hovering status bar actions, change background like you did before [Changes]
- before your edits, actions were sticking to right edge, now we have an undesired padding [Changes]
- such margin [Pasted text] should be a part of status bar, not outside wrapper
- status bar can be shown above or below, it determines whether border radius is on top or bottom corners. Should accept appropriate prop and set radius from within `packages/ui/src/components/editor/prompt/StatusBar/StatusBar.tsx` appropriately
- status bar should accept description prop instead of such hacks [Fragment]
- `packages/ui/src/components/editor/prompt/BrowserConnectionStatus/BrowserConnectionStatus.tsx` and `packages/ui/src/components/editor/prompt/PromptAttachments/PromptAttachments.tsx` are not ui components, should be placed in `apps/editor/src/views/prompt/frontend/Main/MainView/components`
- hide `apps/editor/src/views/prompt/frontend/Main/MainView/components/BrowserConnectionStatus/BrowserConnectionStatus.tsx` when connected: once shown responses, when not connected: once showing responses
- `apps/editor/src/views/prompt/frontend/Main/MainView/components/BrowserConnectionStatus/BrowserConnectionStatus.tsx` should reappear immediately while not connected and not having responses
├── apps
│ └── editor
│ └── src
│ └── views
│ └── prompt
│ └── frontend
│ └── Main
│ └── MainView
│ ├── MainView.module.scss
│ ├── MainView.tsx
│ └── components
│ ├── BrowserConnectionStatus
│ │ ├── BrowserConnectionStatus.tsx
│ │ └── index.ts
│ ├── Header
│ │ ├── Header.module.scss
│ │ ├── Header.tsx
│ │ ├── hooks
│ │ │ └── use-keyboard-shortcuts.ts
│ │ └── index.ts
│ └── PromptAttachments
│ ├── PromptAttachments.tsx
│ └── index.ts
└── packages
└── ui
└── src
└── components
└── editor
└── prompt
├── BrowserConnectionStatus
│ ├── BrowserConnectionStatus.module.scss
│ ├── BrowserConnectionStatus.stories.tsx
│ └── BrowserConnectionStatus.tsx
├── PromptAttachments
│ ├── PromptAttachments.module.scss
│ ├── PromptAttachments.stories.tsx
│ └── PromptAttachments.tsx
├── ResponsePreview
│ └── components
│ └── FileItem
│ ├── FileItem.module.scss
│ ├── FileItem.tsx
│ └── index.ts
└── StatusBar
├── StatusBar.module.scss
├── StatusBar.tsx
└── index.ts1 parent dd2789e commit 9d9ce02
16 files changed
Lines changed: 383 additions & 485 deletions
File tree
- apps/editor/src/views/prompt/frontend/Main/MainView
- components
- BrowserConnectionStatus
- PromptAttachments
- packages/ui/src/components/editor/prompt
- BrowserConnectionStatus
- PromptAttachments
- ResponsePreview/components/FileItem
- StatusBar
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
| 253 | + | |
253 | 254 | | |
254 | 255 | | |
255 | 256 | | |
| |||
| 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 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 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 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
This file was deleted.
0 commit comments