Repository navigation
Commit 93d913d
committed
Implement multi-column landscape layout support for the main view
- create a mixin 'is-landscape'
- in landscape, should display header, prompt field and configurations in separate scrollable columns. You should a new hook 'use is landscape' in `apps/editor/src/views/prompt/frontend/hooks`
- is landscape should also check if minimum 400px width
- the column with configurations should have left dimmed border but only in landscape and not modern.
- use BEM convention
- in landscape, header elements should be stacked vertically
- in landscape, left column should be only 80px wide
- in landscape, header should have only top and left paddings
- in landscape, left column should take as little space as its content requires
- middle column should have flex: 1.5
- [Fragment] these should apply inside scollable
- main view content seem unnecessary in landscape
- for some reason 'auto' in [Fragment] causes jank on initial load. It has something to do with compacting.
- [Pasted text] should not compact in landscape
├── apps
│ └── editor
│ └── src
│ └── views
│ └── prompt
│ └── frontend
│ ├── Home
│ │ ├── Home.module.scss
│ │ ├── Home.tsx
│ │ ├── hooks
│ │ │ ├── use-has-scrolled-past-mode-button.ts
│ │ │ ├── use-keyboard-shortcuts.ts
│ │ │ └── use-tasks.ts
│ │ └── index.ts
│ ├── Main
│ │ └── MainView
│ │ ├── MainView.module.scss
│ │ ├── MainView.tsx
│ │ ├── components
│ │ │ └── Header
│ │ │ ├── Header.module.scss
│ │ │ ├── Header.tsx
│ │ │ └── index.ts
│ │ └── hooks
│ │ ├── use-invocation-counts.ts
│ │ ├── use-keyboard-shortcuts.ts
│ │ ├── use-last-choice-tooltip.ts
│ │ └── use-re-render-on-interval.ts
│ └── hooks
│ ├── use-editor-sync.ts
│ └── use-is-landscape.ts
└── packages
└── ui
└── src
├── components
│ └── editor
│ └── prompt
│ └── CompactableActionButton
│ ├── CompactableActionButton.module.scss
│ └── CompactableActionButton.tsx
└── styles
└── foundation
├── _colors.scss
├── _index.scss
├── _mixins.scss
└── _variables.scss1 parent 69b3c26 commit 93d913d
6 files changed
Lines changed: 429 additions & 286 deletions
File tree
- apps/editor/src/views/prompt/frontend
- Main/MainView
- components/Header
- hooks
- packages/ui/src/styles/foundation
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 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 | + | |
20 | 62 | | |
0 commit comments