Skip to content

Commit ec99ee2

Browse files
Olasunkanmi OyinlolaOlasunkanmi Oyinlola
authored andcommitted
feat(ui): Display selected contexts as icons
- Introduces a visual representation of selected contexts using icons. - Updates the UI to map the selected contexts to display them as icons. - Adjusts the styling of hr elements for better visual appearance.
1 parent eec719b commit ec99ee2

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

webviewUi/src/components/webview.tsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,19 @@ export const WebviewUI = () => {
231231
Active workspace:
232232
{selectedContext.includes(activeEditor) ? "" : `${activeEditor}`}
233233
</small>
234-
<small>{Array.from(new Set(selectedContext.split("@").join(", ").split(", "))).join(" ")}</small>
234+
{selectedContext.length > 1 ? (
235+
<small>
236+
{Array.from(new Set(selectedContext.split("@").join(", ").split(", "))).map((item) => {
237+
return item.length > 1 ? (
238+
<span className="attachment-icon" key={item}>
239+
{item}
240+
</span>
241+
) : null;
242+
})}
243+
</small>
244+
) : (
245+
<></>
246+
)}
235247
</span>
236248
</div>
237249
<WorkspaceSelector activeEditor={activeEditor} onInputChange={handleContextChange} folders={folders} />

webviewUi/src/index.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -488,10 +488,10 @@ hr {
488488
cursor: pointer;
489489
color: #787c99;
490490
transition: color .3s ease;
491-
border-radius: 9px;
491+
border-radius: 6px;
492492
border: 1px solid;
493-
border-color: rgb(47 47 47);
494-
margin-top: 10px;
493+
border-color: #363b54;
494+
margin: 10px 2px 0px 2px;
495495
}
496496

497497
.attachment-icon.active {

0 commit comments

Comments
 (0)