Skip to content

Commit

Permalink
feat(dialog/search-chats): Improve Search chats in dialogs & date p…
Browse files Browse the repository at this point in the history
…ills spacing in sidebar (#80)

- Improved the design and layout of the "Search chats..." dialog
- Decreased spacing for date pills in sidebars for a more compact look

Changes summary:
    - Enhanced the search chats dialog and date pill spacing in sidebars for a better user experience.
  • Loading branch information
itsmartashub committed Dec 6, 2024
1 parent 93b59b4 commit 9be76a6
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 11 deletions.
13 changes: 13 additions & 0 deletions src/sass/abstract/_extends.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,17 @@
hsla(var(--accent-hsl) / 0.45) 100%);
border: 1px solid hsla(var(--accent-hsl) / 0.2);
backdrop-filter: blur(10px);
}

%date-pill {
display: inline-block !important;
color: var(--c-accent) !important;
background-color: hsl(var(--accent-hsl) / 0.2) !important;
border-radius: 100vw;
text-transform: uppercase;
font-weight: bold;
height: auto !important;
line-height: 1 !important;
padding: 0.32rem 0.6rem !important;

}
21 changes: 21 additions & 0 deletions src/sass/elements/_dialogs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,27 @@
}


&:has(input[placeholder="Search chats..."]) {

ol > li {
.cursor-pointer {
[class*='bg-[#f4f4f4]'] {
background-color: var(--c-surface-3) !important;
}
}

.group.text-xs.text-token-text-secondary {
@extend %date-pill;
// padding: 0.3rem 0.6rem !important;
}

.loading-results-shimmer {
--main-surface-secondary: var(--c-surface-2) !important;
--main-surface-tertiary: var(--c-surface-3) !important;
}
}
}

}

html.dark[data-gptheme='oled'] [role='dialog'] {
Expand Down
12 changes: 1 addition & 11 deletions src/sass/elements/_sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,10 @@ nav[aria-label='Chat history'] {

/* Parent of time heading (of Today, Yesterday) in sidebar */
span:has(> h3) {
margin-top: 1.5rem !important;
margin-bottom: 0.3rem !important;

/* Today, Yesterday - Time heading in sidebar */
h3 {
display: inline-block !important;
color: var(--c-accent) !important;
background-color: hsl(var(--accent-hsl) / 0.2) !important;
border-radius: 100vw;
text-transform: uppercase;
font-weight: bold;
padding: 0.5rem 1rem !important;
height: auto !important;
line-height: 1 !important;
@extend %date-pill;
}
}

Expand Down

0 comments on commit 9be76a6

Please sign in to comment.