Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix all the broken styles due to new ChatGPT layout (GPT4o) #17

Merged
merged 49 commits into from
May 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
727eb51
refactor(chat-bubbles): rewrite logic and improve user chat bubble de…
itsmartashub May 15, 2024
e76508c
fix(prompt-textarea): resolve design issues and remove deprecated code
itsmartashub May 15, 2024
37c49f7
refactor(buttons): enhance button styles and improve color contrast
itsmartashub May 15, 2024
a11e618
fix(context-menu): resolve icon background and SVG color issues, remo…
itsmartashub May 15, 2024
48a44ca
fix(reply): resolve issues with reply in prompt textarea and user cha…
itsmartashub May 15, 2024
21c588f
fix(reply): ensure replies in user chat are aligned to the right (end)
itsmartashub May 15, 2024
ce2814d
feat(attach-files): add accent color to icon and restyle `limit reach…
itsmartashub May 15, 2024
e3f8117
fix(search-links): improve styling and add border-radius
itsmartashub May 15, 2024
3be26a0
refactor(gpt4o-limit): update `GPT-4.0 limit reached` notification bu…
itsmartashub May 15, 2024
0aab1af
feat(new-chat-cards): enhance pregenerated prompt example card buttons
itsmartashub May 16, 2024
6496ddb
refactor(gpt4o-limit): enhance styling and fix overall broken buttons
itsmartashub May 16, 2024
e5dda81
fix(chat-bubbles): resolve user chat bubble styling issue due to GPTs…
itsmartashub May 16, 2024
b8f00a2
refactor(sticky-header): enhance bg color to match the chats containe…
itsmartashub May 16, 2024
019e319
feat(GPTs): enhance GPTs Store page notification style on the top of …
itsmartashub May 16, 2024
504a102
refactor(tooltip): improve styling specificity to fix ❓ btn and `4o l…
itsmartashub May 16, 2024
375acdb
fix(share-link-dialog): resolve gradient issue
itsmartashub May 16, 2024
203b7b6
refactor(prompt-textarea): improve design consistency to `Temporary c…
itsmartashub May 16, 2024
1efb58c
fix(warnings): update `ToS`/`ToU` warning styling
itsmartashub May 16, 2024
17204dd
fix(chat-bubbles): improve `Reply` positioning, search links wrapping…
itsmartashub May 16, 2024
8eff21d
refactor(tooltips): enhance various tooltip styles and add border-rad…
itsmartashub May 16, 2024
ba3694d
refactor(attach-files): align 📎 icon (and send btn) to the end of the…
itsmartashub May 16, 2024
e2a8f87
feat(feedback-buttons): enhance styling for `Tell us more` example 👎 …
itsmartashub May 16, 2024
c221a2d
fix(GPTs): resolve broken gradient in dialog header when clicked on G…
itsmartashub May 16, 2024
8d9372e
refactor(image-preview): enhance design and remove strange frame from…
itsmartashub May 16, 2024
699a71b
fix(attach-files): ensure accent coloring of `Attach files` svg icon 📎
itsmartashub May 16, 2024
c19d5cb
refactor(share-link-dialog): remove `.from-token-main-surface-primary…
itsmartashub May 16, 2024
b152ec0
fix(prompt-textarea): correct text and caret color in `Temporary chat…
itsmartashub May 16, 2024
dd407c7
refactor(prompt-textarea): restore old styling for guests and GPT-3.5…
itsmartashub May 16, 2024
fbbf28a
refactor(styling-compatibility): improve logic for old and new UIs
itsmartashub May 17, 2024
94382b7
refactor(old-ui/prompt-textarea): restore old styling for guests and …
itsmartashub May 16, 2024
7389a23
refactor(old-ui/styling-compatibility): improve logic for old and new…
itsmartashub May 17, 2024
d227cbe
fix(old-ui/attach-files): ensure correct positioning of attach icon
itsmartashub May 17, 2024
6a6f660
rebase: before rbs
itsmartashub May 17, 2024
05c59e9
refactor(old-ui): reintroduce design logic for various UI elements
itsmartashub May 17, 2024
ca04d45
test(old-ui): troubleshoot gpt chat bubble hover footer icons issue
itsmartashub May 17, 2024
de6dbb2
fix(old-ui/unique-detection-selectors): improve reliability of old UI…
itsmartashub May 17, 2024
928bcb2
fix(old-ui/chat-bubble): improve user chat bubble edit state design
itsmartashub May 17, 2024
4547610
fix(old-ui/button-icon): improve SVG icon visibility in `.btn-secondary`
itsmartashub May 17, 2024
9994c87
refactor(old-ui/chat-bubbles): enhance chat bubble design, especially…
itsmartashub May 17, 2024
8b62102
fix(old-ui/prompt-textarea): ensure `Stop generating` button is corre…
itsmartashub May 17, 2024
7ff0306
refactor(old-ui/uploaded-image): enhance uploaded image styling in us…
itsmartashub May 17, 2024
3310e79
refactor(old-ui/unique-detection-selectors): improve detection and fi…
itsmartashub May 17, 2024
3a6ad8f
refactor(old-ui/attach-files): remove positioning the "Attach Files" …
itsmartashub May 17, 2024
43209ee
chore(old-ui/testing-borders): remove temporary borders
itsmartashub May 17, 2024
9ced586
feat(attached-files): enhance appearance of attached images and files
itsmartashub May 17, 2024
2d34e03
feat(mentions): enhance `@` mentions design above prompt textarea
itsmartashub May 17, 2024
d6c7533
fix(warnings): ensure consistent coloring for @mentions error messages
itsmartashub May 17, 2024
2282e7c
refactor(old-ui/code-organization): improve code organization by spli…
itsmartashub May 19, 2024
5011a75
chore(code-cleanup): remove built code
itsmartashub May 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/sass/abstract/_extends.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
content: '';
position: absolute;
width: 100%;
height: 2px;
bottom: -5px;
height: 1.5px;
bottom: -4px;
left: 0;
// right: 0; /* Set right to cover the entire link */
background-color: currentColor;
Expand Down
25 changes: 11 additions & 14 deletions src/sass/abstract/_vars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

/* ? --- Border-radius --- */
--br: 1rem;
--br-chat-bubble: calc(var(--br) * 2.55);
--br-chat-bubble: calc(var(--br) * 1.9);
// --br-chat-bubble: 30px;
--br-prompt-textarea: calc(var(--br) * 2.25);
--br-btn: calc(var(--br) / 1.1);
--br-btn-big: calc(var(--br) * 1.2);
Expand All @@ -20,17 +21,17 @@
--br-tooltips: var(--br-btn);

/* ? --- Paddings --- */
--p-chat-bubble: 1.5rem;
--p-chat-bubble: 1.2rem;
--p-contextmenu: 0.8rem;
--p-contextmenu-item: 0.9rem 1rem;
--p-prompt-textarea: 0.7rem;
--p-tooltips: 0.2rem;
--p-btn: 0.77rem;
--p-btn: 0.7rem;
--py-btn: 1rem;
--px-btn: 1rem;

--p-sidebar-nav: 0.5rem;
--p-sidebar-nav-a-new-chat: 2rem;
--p-sidebar-nav-a-new-chat: 1.8rem;
--p-sidebar-nav-a: 0.6rem;
--p-dialog: 2rem;

Expand Down Expand Up @@ -76,7 +77,7 @@
--main-surface-secondary: var(--c-surface-2) !important;

/* ??? */
--main-surface-tertiary: var(--c-surface-3);
--main-surface-tertiary: var(--c-surface-3) !important;

/* sidebar collapse btn */
--text-quaternary: var(--c-surface-3) !important;
Expand Down Expand Up @@ -163,12 +164,11 @@ html.light {
/* ? ========== Layout colors ========== */
--c-bg-sidebar: var(--c-surface-1);
--c-bg-chats-container: hsl(var(--accent-h) var(--surface-s) calc(var(--surface-l) * 1.025));
--c-bg-chats-sticky: hsla(var(--accent-hsl) / 0.02);
--c-bg-chats-sticky: hsla(var(--accent-h) var(--surface-s) calc(var(--surface-l) * 1.025) / 0.02);

/* ? ========== Chat bubbles colors ========== */
--c-bg-msg-user: hsla(var(--accent-hsl) / 0.08);
--c-bg-msg-gpt: hsl(0 0% 84%);
--c-msg-name-user: var(--c-accent);

/* ? ========== Type message textarea colors ========== */
--c-bg-textarea: hsla(0, 0%, calc(var(--surface-l) / 1.05));
Expand All @@ -186,7 +186,7 @@ html.light {
--c-bg-tooltip: var(--c-accent-light);

/* ? ========== border colors ========== */
--c-border: hsla(var(--txt-hsl) / 0.05);
--c-border: hsla(var(--txt-hsl) / 0.08);
--c-border-accent: hsla(var(--accent-hsl) / 0.1);

/* ? ========== btn colors ========== */
Expand Down Expand Up @@ -298,12 +298,11 @@ html.dark {
/* ? ========== Layout colors ========== */
--c-bg-sidebar: var(--c-surface-1);
--c-bg-chats-container: hsl(var(--accent-h) var(--surface-s) calc(var(--surface-l) * 1.076));
--c-bg-chats-sticky: hsla(var(--surface-hsl) / 0.02);
--c-bg-chats-sticky: hsla(var(--accent-h) var(--surface-s) calc(var(--surface-l) * 1.076) / 0.02);

/* ? ========== Chat bubbles colors ========== */
--c-bg-msg-user: hsla(var(--accent-hsl) / 0.04);
--c-bg-msg-gpt: hsla(var(--accent-hsl) / 0.08);
--c-msg-name-user: var(--c-accent);
// --c-msg-name-gpt: var(--c-green);

/* ? ========== Type message textarea colors ========== */
Expand Down Expand Up @@ -439,15 +438,13 @@ html.dark[data-gptheme='oled'] {
// --c-bg-chats-container: var(--c-surface-2);
--c-bg-sidebar: black;
--c-bg-chats-container: black;
--c-bg-chats-sticky: black;
--c-bg-chats-sticky: rgba(0, 0, 0, 0.02);

/* ? ========== Chat bubbles colors ========== */
// --c-bg-msg-user: hsla(var(--accent-hsl) / 0.04);
// --c-bg-msg-gpt: hsla(var(--accent-hsl) / 0.08);
--c-bg-msg-user: hsl(var(--accent-h), calc(var(--surface-s) + 15%), calc(var(--surface-l) + 4%));
--c-bg-msg-gpt: hsl(var(--accent-h), calc(var(--surface-s) + 20%), calc(var(--surface-l) + 6%));
--c-msg-name-user: var(--c-accent);
// --c-msg-name-gpt: var(--c-green);

/* ? ========== Type message textarea colors ========== */
--c-bg-textarea: var(--c-surface-3);
Expand All @@ -463,7 +460,7 @@ html.dark[data-gptheme='oled'] {
--c-bg-tooltip: var(--c-accent-light);

/* ? ========== border colors ========== */
--c-border: var(--c-surface-3);
--c-border: var(--c-surface-2);
--c-border-accent: hsla(var(--accent-hsl) / 0.05);

/* ? ========== btn colors ========== */
Expand Down
106 changes: 70 additions & 36 deletions src/sass/elements/_btn.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.btn {
background-color: var(--c-bg-btn) !important;
// background-color: var(--c-bg-btn) !important;
// background-color: hsla(var(--accent-hsl) / 0.18);

color: var(--c-btn) !important;
border-radius: var(--br-btn) !important;
border: none !important;
Expand All @@ -8,30 +10,46 @@
// padding: 1.5rem !important;
padding: var(--p-btn) !important;
}
}

/* .btn-primary {
background-color: var(--c-bg-btn) !important;
} */
&-primary {
background-color: var(--c-bg-btn) !important;
}
&-secondary {
// background-color: hsl(var(--accent-h), calc(var(--accent-s) / 1.8), var(--accent-l)) !important;
// background-color: hsl(var(--accent-h), calc(var(--accent-s) * 0.5), 50%) !important;

.btn-danger {
background-color: var(--c-danger) !important;
color: var(--c-bg-chats-container) !important;
}
// background-color: hsl(var(--accent-h), calc(var(--accent-s) * 0.3), 55%) !important;
// color: var(--c-txt) !important;

// .btn-secondary {
// background-color: red !important;
// }
// background-color: transparent !important;
color: var(--c-accent) !important;
background-color: hsla(var(--accent-hsl) / 0.15) !important;
backdrop-filter: blur(5px);

svg {
// color: var(--c-accent) !important;
fill: var(--c-accent) !important;
}
// outline: 2px solid var(--c-accent);
}
&-danger {
background-color: var(--c-danger) !important;
color: var(--c-bg-chats-container) !important;
}

/* === RIGHT - Scroll Down arrow bg LIGHT === */
// html.light main [role="presentation"] button.absolute.rounded-full {
// background-color: var(--c-txt) !important;
// }
&-green {
background-color: var(--c-accent) !important;
}

&:not(&-secondary, &-danger, &-green) {
background-color: var(--c-accent) !important;

// &:hover {
// color: var(--c-accent) !important;
// }
}
}

/* === RIGHT - Scroll Down arrow bg DARK === */
// html.dark main [role="presentation"] button.absolute.rounded-full {
// background-color: var(--c-accent) !important;
// }
main [role='presentation'] button.absolute.rounded-full {
background-color: var(--c-accent) !important;
box-shadow: var(--box-shadow-contextmenu);
Expand All @@ -48,29 +66,32 @@ main [role='presentation'] button.absolute.rounded-full {
min-width: var(--min-w-btn);
}

&:not(.PopoverContent) .btn-neutral {
background-color: var(--c-surface-3) !important;
color: var(--c-txt) !important;
}

/* ".PopoverContent" je recimo menu od btn u "Shared Link to Chat" 3dots menu (Shared your Name & Delete Link) */
&.PopoverContent {
.btn-neutral {
background-color: transparent !important;
color: var(--c-txt) !important;
}
}
// &:not(.PopoverContent) .btn-neutral {
// background-color: var(--c-surface-3) !important;
// color: var(--c-txt) !important;
// }

// /* ".PopoverContent" je recimo menu od btn u "Shared Link to Chat" 3dots menu (Shared your Name & Delete Link) */
// &.PopoverContent {
// .btn-neutral {
// background-color: transparent !important;
// color: var(--c-txt) !important;
// }
// }
}

/* === Settings > Tabs === */
[role='tablist'] button {
padding: var(--p-btn) !important;
padding: var(--p-btn);
background-color: transparent !important;

&[data-state='active'],
&:hover {
// TODO Ovo je ok za desktop, ali za manje je bolje surface-1. Takodje dodati horiz gap izmedju
background-color: var(--c-surface-3) !important;
// background-color: var(--c-surface-3) !important;
// @extend .btn-secondary;
background-color: var(--c-accent) !important;
color: var(--c-on-accent) !important;
}
}

Expand Down Expand Up @@ -102,7 +123,8 @@ button[role='switch'] {
/* === Settings > Theme selector drop down */
button[role='combobox'] {
@extend .btn;
@extend .btn-neutral;
@extend .btn-secondary;
font-weight: 500 !important;
min-width: var(--min-w-btn);

/* Theme btn - fix height smaller then other btns */
Expand All @@ -113,7 +135,7 @@ button[role='combobox'] {
/* === ❓ circle btn on bottom right */
button[id*='headlessui-menu-button'][class*='rounded-full'] {
color: var(--c-txt) !important;
border: none !important;
border: 1x solid var(--c-accent) !important;
background-color: var(--c-surface-3) !important;
}

Expand All @@ -126,3 +148,15 @@ button[class*='bg-brand-purple'] {
background-color: var(--c-accent) !important;
color: var(--c-on-accent) !important;
}

/* "Tell us more" example buttons when clicked on 👎 in GPT chat bubble and the same buttons in "Provide Additional Feedback" when clicked on "More" */
button.border-token-border-light[class*='hover:bg-token-main-surface-secondary'] {
border: 1px solid hsla(var(--accent-hsl) / 0.1) !important;
color: var(--c-accent) !important;
backdrop-filter: blur(14px);

&:hover {
transform: translateY(-1px);
background-color: hsla(var(--accent-hsl) / 0.1) !important;
}
}
16 changes: 15 additions & 1 deletion src/sass/elements/_dialogs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@

// bg-gradient of link preview
.from-token-main-surface-primary {
--gradient-color-from: --main-surface-primary;
display: none;
// --gradient-color-from: var(--main-surface-primary);
}

/* PUBLIC LINK UPDATED - Social platforms in show in footer after the "🔗 Copy Link" btn */
Expand Down Expand Up @@ -274,6 +275,11 @@
--border-medium: transparent !important;
}

/* Gradient in dialog header when clicked on GPTs product, but if we add this style here it broke the gradient in "Create Link" dialog bcs there is var(--c-surface-3) (or var(--main-surface-primary) */
.from-token-main-surface-primary {
--main-surface-primary: var(--c-surface-2) !important;
}

/* Numbers in "Ratings" svg stars */
svg.text-green-500 ~ .text-white {
color: var(--c-on-accent) !important;
Expand Down Expand Up @@ -307,6 +313,14 @@
}
}
}

&:has(img[alt='Uploaded image']) {
padding: 0 !important;
img[alt='Uploaded image'] {
border-radius: var(--br-contextmenu);
outline: 1px solid hsla(var(--accent-hsl) / 0.5);
}
}
}

/* ! NOT WORKING - CANNOT OVERWRITE THIS WTF */
Expand Down
Loading