Skip to content

Commit 25110f0

Browse files
committed
Make completed tasks list collapsible and keep header actions visible when expanded
- clicking anywhere on completed tasks should collapse them - once opened, show 'clear session' at all times └── packages └── ui └── src └── components └── editor └── common └── prompts └── PromptField ├── PromptField.module.scss ├── PromptField.stories.tsx ├── PromptField.tsx ├── components │ ├── CompletedTasks │ │ ├── CompletedTasks.module.scss │ │ ├── CompletedTasks.tsx │ │ └── index.ts │ ├── Footer │ │ ├── Footer.module.scss │ │ ├── Footer.tsx │ │ └── index.ts │ └── Tabs │ ├── Tabs.module.scss │ ├── Tabs.tsx │ └── index.ts ├── 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
1 parent 56fefc0 commit 25110f0

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
opacity: 0;
2929
}
3030

31+
&--expanded &__right,
3132
&:hover &__right {
3233
opacity: 1;
3334
}
@@ -49,18 +50,23 @@
4950
}
5051
}
5152

53+
.tasks-list {
54+
cursor: pointer;
55+
}
56+
5257
.completed-task {
5358
padding: 2px 7px;
54-
pointer-events: none;
5559
opacity: var(--dimmed-opacity);
5660

5761
&__checkbox {
5862
float: left;
5963
display: flex;
6064
margin: 2px 5px 0 0;
65+
pointer-events: none;
6166
}
6267

6368
&__text {
6469
display: inline;
70+
pointer-events: none;
6571
}
6672
}

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,10 @@ export const CompletedTasks: React.FC<CompletedTasksProps> = ({
100100
)}
101101
</div>
102102
{is_expanded && (
103-
<>
103+
<div
104+
className={styles['tasks-list']}
105+
onClick={() => set_is_expanded(false)}
106+
>
104107
{[...tasks].reverse().map((task, idx) => (
105108
<CompletedTask
106109
key={idx}
@@ -109,7 +112,7 @@ export const CompletedTasks: React.FC<CompletedTasksProps> = ({
109112
is_web_target={is_web_target}
110113
/>
111114
))}
112-
</>
115+
</div>
113116
)}
114117
</>
115118
)

0 commit comments

Comments
 (0)