via the `#codemirror` or `#prosemirror-editor-container` elements.
Changes summary:
- Ensured the background is applied correctly to the loading skeleton when there is no text or code canvas section loaded yet.
---
src/sass/elements/_canvas.scss | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/sass/elements/_canvas.scss b/src/sass/elements/_canvas.scss
index c5d1b9fc..79f90fb3 100644
--- a/src/sass/elements/_canvas.scss
+++ b/src/sass/elements/_canvas.scss
@@ -87,6 +87,11 @@
.absolute.left-0.z-20.h-full.overflow-hidden,
.fixed.inset-0.z-40.overflow-hidden {
+ /* Loading screen for Canvas when there is no #codemirror or #prosemirror-editor-container loaded yet */
+ section.popover:has(main [class*="absolute left-0 top-0 h-full w-full rotate-45 bg-gradient-to-r from-transparent via-black/20 to-transparent opacity-50 dark:via-white/5"]) {
+ background-color: var(--c-bg-cm) !important;
+ }
+
&:has(section.popover main #codemirror, section.popover main #prosemirror-editor-container) {
.bg-black {
background-color: var(--c-accent) !important;
From bbcaf874fe4be601925f7a3dd9bd68f2a1caa28f Mon Sep 17 00:00:00 2001
From: itsmartashub <44645238+itsmartashub@users.noreply.github.com>
Date: Sat, 14 Dec 2024 00:08:59 +0100
Subject: [PATCH 36/44] fix(canvas/gpth-floating): hide GPThemes floating
button when canvas is opened or skeleton-loading (#86)
- Hide the GPT themes floating button when a code or text canvas is opened
- Ensure the button remains hidden when the canvas skeleton-loading layout is active
Changes summary:
- Hid the GPT themes floating button when a code or text canvas is opened.
- Ensured the button remains hidden when the canvas skeleton-loading layout is active.
---
src/sass/elements/_canvas.scss | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/sass/elements/_canvas.scss b/src/sass/elements/_canvas.scss
index 79f90fb3..dc532ffa 100644
--- a/src/sass/elements/_canvas.scss
+++ b/src/sass/elements/_canvas.scss
@@ -405,4 +405,15 @@
--main-surface-secondary: var(--c-surface-3) !important;
}
}
+}
+
+
+/* Hide the floating button when Canvas is opened */
+body:has(.absolute.z-20.h-full.transition-shadow.overflow-hidden.left-0 section.popover main #codemirror),
+body:has(.absolute.z-20.h-full.transition-shadow.overflow-hidden.left-0 section.popover main #prosemirror-editor-container),
+body:has(.absolute.z-20.h-full.transition-shadow.overflow-hidden.left-0 section.popover main [class*="absolute left-0 top-0 h-full w-full rotate-45 bg-gradient-to-r from-transparent via-black/20 to-transparent opacity-50 dark:via-white/5"]) {
+ .gpth__floating {
+ opacity: 0;
+ pointer-events: none;
+ }
}
\ No newline at end of file
From 54b2b89845250ff1ce77313f09607059e70b6fce Mon Sep 17 00:00:00 2001
From: itsmartashub <44645238+itsmartashub@users.noreply.github.com>
Date: Sat, 14 Dec 2024 20:22:51 +0100
Subject: [PATCH 37/44] feat(canvas/chats-@container): implement more compact
chat styles for Canvas view using `@container` queries (#92, #86)
- Applied mobile-like chat styles when the canvas is opened and the parent element of chats and the prompt field is less than `md` or `sm` breakpoint using the new `@container` CSS property
- Made chats and the prompt textarea full width for a more compact and readable layout
- Removed unnecessary elements like the GPT logo, big paddings,big paddings and spacing around, and border radius for a cleaner look
Changes summary:
- Enhanced chat styles to be more compact and readable when the canvas is opened
- Made the chats and prompt textarea full width for better visual appeal in the canvas layout.
- Removed unnecessary elements like the GPT logo, big paddings and spacing around, and border radius to create a cleaner and more readable design
---
src/sass/abstract/_bp.scss | 47 +++++++++-
src/sass/abstract/_vars.scss | 18 +++-
.../elements/_chats-textarea-max-width.scss | 9 +-
src/sass/elements/_right--main.scss | 89 +++++++++++++++++--
4 files changed, 151 insertions(+), 12 deletions(-)
diff --git a/src/sass/abstract/_bp.scss b/src/sass/abstract/_bp.scss
index 811d9d46..bd3eeed8 100644
--- a/src/sass/abstract/_bp.scss
+++ b/src/sass/abstract/_bp.scss
@@ -71,4 +71,49 @@ $xxl: 96em; // 1536px
@include dev('xxl') {
// Your styles for 2x extra-large screens (min-width: 1536px)
-} */
\ No newline at end of file
+} */
+
+
+@mixin container($bp) {
+ @if $bp =='xxs' {
+ @container (max-width: #{$xxs}) {
+ @content;
+ }
+ }
+
+ @if $bp =='xs' {
+ @container (max-width: #{$xs}) {
+ @content;
+ }
+ }
+
+ @if $bp =='sm' {
+ @container (max-width: #{$sm}) {
+ @content;
+ }
+ }
+
+ @if $bp =='md' {
+ @container (max-width: #{$md}) {
+ @content;
+ }
+ }
+
+ @if $bp =='lg' {
+ @container (max-width: #{$lg}) {
+ @content;
+ }
+ }
+
+ @if $bp =='xl' {
+ @container (max-width: #{$xl}) {
+ @content;
+ }
+ }
+
+ @if $bp =='xxl' {
+ @container (min-width: #{$xxl}) {
+ @content;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/sass/abstract/_vars.scss b/src/sass/abstract/_vars.scss
index c4d1bacd..86d3efa2 100644
--- a/src/sass/abstract/_vars.scss
+++ b/src/sass/abstract/_vars.scss
@@ -37,7 +37,7 @@
/* ? --- Paddings --- */
--p-chat-bubble: 1.2rem;
- --px-chat-bubble-edge-gap: 4vw;
+ // --px-chat-bubble-edge-gap: 4vw;
--p-contextmenu: 0.8rem;
--p-contextmenu-item: 0.9rem 1rem;
--p-prompt-textarea: 0.7rem;
@@ -133,6 +133,16 @@
--link: var(--c-accent) !important;
+ @include container('md') {
+ // --px-chat-bubble-edge-gap: 1vw;
+ --p-chat-bubble: .8rem;
+ --br-chat-bubble: calc(var(--br) * 1.1);
+ }
+
+ @include container('sm') {
+ --br-chat-bubble: var(--br) !important;
+ }
+
@include dev('md') {
--p-chat-bubble: .8rem;
--br-chat-bubble: calc(var(--br) * 1.55);
@@ -143,9 +153,9 @@
--p-sidebar-nav: 0.3rem;
}
- @include dev('sm') {
- --px-chat-bubble-edge-gap: 0.45rem;
- }
+ // @include dev('sm') {
+ // --px-chat-bubble-edge-gap: 0.45rem;
+ // }
// --box-shadow-sticky: 0 10px 40px 5px hsla(var(--accent-h) var(--surface-s) calc(var(--surface-l) * 1.025) / 0.85);
diff --git a/src/sass/elements/_chats-textarea-max-width.scss b/src/sass/elements/_chats-textarea-max-width.scss
index 02d990cf..dfd838c8 100644
--- a/src/sass/elements/_chats-textarea-max-width.scss
+++ b/src/sass/elements/_chats-textarea-max-width.scss
@@ -2,13 +2,18 @@
// main:has(#prompt-textarea) [class*="xl:max-w-[48rem]"] {
main:has(#composer-background) {
.px-3.text-base.m-auto {
- padding-left: var(--px-chat-bubble-edge-gap) !important;
- padding-right: var(--px-chat-bubble-edge-gap) !important;
+ // padding-left: var(--px-chat-bubble-edge-gap) !important;
+ // padding-right: var(--px-chat-bubble-edge-gap) !important;
/* Only textarea wrapper */
.mx-auto.flex.flex-1.text-base:has(>form) {
max-width: var(--w_prompt_textarea) !important;
+ // @include container('md') {
+ // border: 1px solid green !important;
+ // --w_prompt_textarea: 100%;
+ // }
+
/* TODO This element causes weird empty space before prompt field which makes prompt fields visually unshifted or misaligned. The best would be to display:none, but idk if that would be filled with some important content in the future. So I use :empty to remove it only when this element is without any content. */
& > div.flex.justify-center:has(~form):empty {
// border: 4px solid orange !important;
diff --git a/src/sass/elements/_right--main.scss b/src/sass/elements/_right--main.scss
index 81d3e31a..298530bc 100644
--- a/src/sass/elements/_right--main.scss
+++ b/src/sass/elements/_right--main.scss
@@ -2,6 +2,7 @@
/* .grow.overflow-auto.bg-token-main-surface-primary:has(article) - is for the targeting "Share Link" page */
.grow.overflow-auto.bg-token-main-surface-primary:has([data-testid^='conversation-turn-']),
main [role='presentation'] {
+ container: inline-size;
/* Main Page chat-container Bg*/
&,
@@ -34,22 +35,43 @@ main [role='presentation'] {
/* @ === RIGHT - CHATS BUBBLES ===*/
[data-testid^='conversation-turn-'] {
+ // container: inline-size / article;
+ // container: inline-size;
+ // container: article / inline-size;
/* Edit icon in user chat for example. Edit state user chat bg */
--main-surface-tertiary: var(--c-surface-3) !important;
// margin-bottom: var(--mb-chat-bubble) !important;
+ @include container('sm') {
+ // --px-chat-bubble-edge-gap: 0.45rem;
+ --p-chat-bubble: 1rem;
+ --br-chat-bubble: calc(var(--br) * 1.2);
+
+ .m-auto.text-base:has(>.mx-auto.flex.flex-1.text-base[class*="md:max-w-3xl"]) {
+ // border: 2px solid red !important;
+ padding-left: 0.8rem !important;
+ padding-right: 0.8rem !important;
+ }
+ }
+
div[data-message-author-role],
.prose {
line-height: calc(var(--lineHeight) / 16) !important;
font-size: calc((var(--fontSize) / 16) * 1rem) !important;
}
- /* TODO: check if this [class*='xl:max-w-[48rem]'] can be removed
+ /* Right chat content parent
.mx-auto.flex.flex-1.text-base[class*="md:max-w-3xl"] is GPT chat bubble */
// [class*='xl:max-w-[48rem]'],
/* Necu da stavim direkt na chat bubble jer nece biti dobro kad imamo double response prikazan */
+ // .mx-auto.flex.flex-1.text-base[class*="md:max-w-3xl"] {
.mx-auto.flex.flex-1.text-base[class*="md:max-w-3xl"] {
max-width: var(--w_chat_gpt) !important;
+
+ @include container('md') {
+ --w_chat_gpt: 100%;
+ width: var(--w_chat_gpt);
+ }
}
/* Chat bubble footer SVG icons - edit, read aloud, copy, regenerate, bad response */
@@ -229,11 +251,14 @@ main [role='presentation'] {
padding: calc(var(--p-chat-bubble) * var(--pt-multiplier)) var(--p-chat-bubble) var(--p-chat-bubble) var(--p-chat-bubble) !important;
border-radius: var(--br-chat-bubble) !important;
+ @include container('sm') {
+ --pt-multiplier: 1;
+ }
+
@include dev('sm') {
--pt-multiplier: 1.4;
}
-
/* Left chat content parent
! Adding fixed width prevent content overflowing on the right side of chat bubble when there is some markdown () element shown with scrolling horizontally */
/*
@@ -254,9 +279,16 @@ main [role='presentation'] {
width: calc(100% - var(--svg-w) - var(--svg-gap) - var(--p-chat-bubble) - var(--p-chat-bubble)) !important; // more consistent width (right chat bubble spacing = left spacing)
+ @include container('md') {
+ --svg-gap: 1.25rem;
+ }
+
+ @include container('sm') {
+ width: 100% !important;
+ }
@include dev('md') {
- --svg-gap: 1.25rem !important; // md-gap-5 (1.25rem)
+ --svg-gap: 1.25rem; // md-gap-5 (1.25rem)
}
@include dev('sm') {
@@ -290,9 +322,14 @@ main [role='presentation'] {
}
/* GPT avatar in its chat bubbles: with img is the GPTs Store item avatar (.gizmo-shadow-stroke), and with svg is gpt logo (.gizmo-bot-avatar ) */
+ @include container('sm') {
+ .flex-shrink-0.flex.flex-col.items-end:has(.gizmo-bot-avatar, .gizmo-shadow-stroke) {
+ display: none !important;
+ }
+ }
+
@include dev('sm') {
.flex-shrink-0.flex.flex-col.items-end:has(.gizmo-bot-avatar, .gizmo-shadow-stroke) {
- // background-color: red !important;
display: none !important;
}
}
@@ -474,4 +511,46 @@ body > .fixed.top-8.right-4 {
--text-primary: var(--c-on-accent) !important;
border-color: var(--c-accent) !important;
}
-}
\ No newline at end of file
+}
+
+
+// @container article (max-width: $sm) {
+
+// [data-testid^='conversation-turn-'] {
+
+// & > div {
+// --px-chat-bubble-edge-gap: 0.4rem !important;
+// }
+
+// .mx-auto.flex.flex-1.text-base[class*="md:max-w-3xl"] {
+// --p-chat-bubble: 0.5rem !important;
+// --br-chat-bubble: var(--br) !important;
+// // background-color: red !important;
+// // border: 4px solid orange !important;
+// width: 100% !important;
+
+// .flex-shrink-0.flex.flex-col.items-end:has(.gizmo-bot-avatar, .gizmo-shadow-stroke) {
+// // background-color: red !important;
+// display: none !important;
+// }
+
+// }
+
+// &:has([data-message-author-role='user']) [class*='bg-token-message-surface'] {
+// width: 100% !important;
+// max-width: 100% !important;
+// }
+
+// &:has([data-message-author-role='assistent']) {
+// border: 2px solid red !important;
+// }
+
+// }
+
+// [data-testid^="conversation-turn-"]:has([data-message-author-role="assistant"]) > div.text-base > div:first-child:has(.markdown) .agent-turn.relative.flex.w-full.flex-col {
+// width: 100% !important;
+// border: 2px solid red !important;
+
+// }
+
+// }
\ No newline at end of file
From f9b55881d6eae934fdf4789bedb60ea692040bc4 Mon Sep 17 00:00:00 2001
From: itsmartashub <44645238+itsmartashub@users.noreply.github.com>
Date: Sat, 14 Dec 2024 21:38:44 +0100
Subject: [PATCH 38/44] fix(canvas/chats-@container): ensure prompt field
updates to full-width when canvas is open and on `md` breakpoints (#92, #86)
- Ensure the prompt field updates to full-width when the canvas is open and on `md` breakpoints by updating the @container mixins to the named
Changes summary:
- Fixed the issue where the prompt field did not update to full-width when the canvas is open and on `md` breakpoints, ensuring consistent layout.
---
src/sass/abstract/_bp.scss | 46 ++++++++++++++++++-
.../elements/_chats-textarea-max-width.scss | 12 +++--
src/sass/elements/_right--main.scss | 5 +-
3 files changed, 53 insertions(+), 10 deletions(-)
diff --git a/src/sass/abstract/_bp.scss b/src/sass/abstract/_bp.scss
index bd3eeed8..c2d19893 100644
--- a/src/sass/abstract/_bp.scss
+++ b/src/sass/abstract/_bp.scss
@@ -74,7 +74,7 @@ $xxl: 96em; // 1536px
} */
-@mixin container($bp) {
+/* @mixin container($bp) {
@if $bp =='xxs' {
@container (max-width: #{$xxs}) {
@content;
@@ -116,4 +116,48 @@ $xxl: 96em; // 1536px
@content;
}
}
+} */
+
+@mixin container($bp, $name: main) {
+ @if $bp =='xxs' {
+ @container #{$name} (max-width: #{$xxs}) {
+ @content;
+ }
+ }
+
+ @if $bp =='xs' {
+ @container #{$name} (max-width: #{$xs}) {
+ @content;
+ }
+ }
+
+ @if $bp =='sm' {
+ @container #{$name} (max-width: #{$sm}) {
+ @content;
+ }
+ }
+
+ @if $bp =='md' {
+ @container #{$name} (max-width: #{$md}) {
+ @content;
+ }
+ }
+
+ @if $bp =='lg' {
+ @container #{$name} (max-width: #{$lg}) {
+ @content;
+ }
+ }
+
+ @if $bp =='xl' {
+ @container #{$name} (max-width: #{$xl}) {
+ @content;
+ }
+ }
+
+ @if $bp =='xxl' {
+ @container #{$name} (min-width: #{$xxl}) {
+ @content;
+ }
+ }
}
\ No newline at end of file
diff --git a/src/sass/elements/_chats-textarea-max-width.scss b/src/sass/elements/_chats-textarea-max-width.scss
index dfd838c8..77dd8bce 100644
--- a/src/sass/elements/_chats-textarea-max-width.scss
+++ b/src/sass/elements/_chats-textarea-max-width.scss
@@ -1,18 +1,20 @@
// main:has(#prompt-textarea) [class*='lg:max-w-[40rem]'] {
// main:has(#prompt-textarea) [class*="xl:max-w-[48rem]"] {
main:has(#composer-background) {
+ // container: inline-size;
+
.px-3.text-base.m-auto {
// padding-left: var(--px-chat-bubble-edge-gap) !important;
// padding-right: var(--px-chat-bubble-edge-gap) !important;
/* Only textarea wrapper */
.mx-auto.flex.flex-1.text-base:has(>form) {
- max-width: var(--w_prompt_textarea) !important;
+ max-width: var(--w_prompt_textarea);
- // @include container('md') {
- // border: 1px solid green !important;
- // --w_prompt_textarea: 100%;
- // }
+ @include container('md') {
+ --w_prompt_textarea: 100%;
+ // border: 1px solid greenyellow !important;
+ }
/* TODO This element causes weird empty space before prompt field which makes prompt fields visually unshifted or misaligned. The best would be to display:none, but idk if that would be filled with some important content in the future. So I use :empty to remove it only when this element is without any content. */
& > div.flex.justify-center:has(~form):empty {
diff --git a/src/sass/elements/_right--main.scss b/src/sass/elements/_right--main.scss
index 298530bc..8f969d9a 100644
--- a/src/sass/elements/_right--main.scss
+++ b/src/sass/elements/_right--main.scss
@@ -2,7 +2,7 @@
/* .grow.overflow-auto.bg-token-main-surface-primary:has(article) - is for the targeting "Share Link" page */
.grow.overflow-auto.bg-token-main-surface-primary:has([data-testid^='conversation-turn-']),
main [role='presentation'] {
- container: inline-size;
+ container: main / inline-size;
/* Main Page chat-container Bg*/
&,
@@ -35,9 +35,6 @@ main [role='presentation'] {
/* @ === RIGHT - CHATS BUBBLES ===*/
[data-testid^='conversation-turn-'] {
- // container: inline-size / article;
- // container: inline-size;
- // container: article / inline-size;
/* Edit icon in user chat for example. Edit state user chat bg */
--main-surface-tertiary: var(--c-surface-3) !important;
// margin-bottom: var(--mb-chat-bubble) !important;
From fab444dcf535ec0deccef0c072e6a79c9b254e4f Mon Sep 17 00:00:00 2001
From: itsmartashub <44645238+itsmartashub@users.noreply.github.com>
Date: Sat, 14 Dec 2024 22:30:16 +0100
Subject: [PATCH 39/44] fix(canvas/chats): correct bg gradients in user chat
bubbles (#86)
- Fix background gradients in chat bubbles to ensure they look consistent and fit the theme when in user chat
Changes summary:
- Corrected the background gradients in user chat bubbles to ensure they look consistent and fit the theme.
---
src/sass/elements/_canvas.scss | 35 +----------------------------
src/sass/elements/_right--main.scss | 29 ++++++++++++++++++++++++
2 files changed, 30 insertions(+), 34 deletions(-)
diff --git a/src/sass/elements/_canvas.scss b/src/sass/elements/_canvas.scss
index dc532ffa..12be3e0b 100644
--- a/src/sass/elements/_canvas.scss
+++ b/src/sass/elements/_canvas.scss
@@ -1,33 +1,3 @@
-/* ______ Canvas in chat bubble */
-.agent-turn:has([id^="textdoc-message"]) {
- // --c-bg-pre: var(--c-surface-1);
- // --c-bg-pre: var(--c-surface-2);
-
- .popover {
- --main-surface-primary: var(--c-bg-cm) !important;
- }
-
- [id^="textdoc-message"] {
- will-change: border-color;
- border: 2px solid hsla(var(--accent-hsl) / .12) !important;
- transition: border-color .2s;
-
- /* Gradient on the bottom of code */
- .absolute.bottom-0.z-20.h-24.w-full.transition-colors {
- background: linear-gradient(rgba(0, 0, 0, 0), var(--c-bg-cm)) !important;
- }
-
- &:hover {
- border-color: hsla(var(--accent-hsl) / .3) !important;
- }
- }
-
- /* Chat bubble - "Typing" btn when canvas creating */
- [role="button"].absolute.bottom-3:has(>.loading-shimmer-pure-text) {
- // --main-surface-primary: red !important;
- }
-}
-
/* ______ CODE CANVAS: CM CodeMirror EDITOR */
#codemirror {
@@ -73,10 +43,7 @@
/* ______ TEXT CANVAS: ProseMirror EDITOR */
#prosemirror-editor-container {
- & > div.bg-token-main-surface-primary.ProseMirror {
- --main-surface-primary: var(--c-bg-cm) !important;
- }
-
+ & > div.bg-token-main-surface-primary.ProseMirror,
.from-token-main-surface-primary {
--main-surface-primary: var(--c-bg-cm) !important;
}
diff --git a/src/sass/elements/_right--main.scss b/src/sass/elements/_right--main.scss
index 8f969d9a..aec095b8 100644
--- a/src/sass/elements/_right--main.scss
+++ b/src/sass/elements/_right--main.scss
@@ -57,6 +57,35 @@ main [role='presentation'] {
font-size: calc((var(--fontSize) / 16) * 1rem) !important;
}
+ /* _________ CANVAS in chat bubbles */
+ &:has([id^="textdoc-message"]) {
+ .popover {
+ --main-surface-primary: var(--c-bg-cm) !important;
+ }
+
+ [id^="textdoc-message"] {
+ --main-surface-primary: var(--c-bg-cm) !important;
+ will-change: border-color;
+ border: 2px solid hsla(var(--accent-hsl) / .12) !important;
+ transition: border-color .2s;
+
+ /* Gradient on the bottom of code */
+ .absolute.bottom-0.z-20.h-24.w-full.transition-colors {
+ background: linear-gradient(rgba(0, 0, 0, 0), var(--c-bg-cm)) !important;
+ }
+ }
+
+ &:hover {
+ border-color: hsla(var(--accent-hsl) / .3) !important;
+ }
+
+
+ /* Chat bubble - "Typing" btn when canvas creating */
+ [role="button"].absolute.bottom-3:has(>.loading-shimmer-pure-text) {
+ // --main-surface-primary: red !important;
+ }
+ }
+
/* Right chat content parent
.mx-auto.flex.flex-1.text-base[class*="md:max-w-3xl"] is GPT chat bubble */
// [class*='xl:max-w-[48rem]'],
From 8c909360d016659ff41119cbc41975f79d0ff796 Mon Sep 17 00:00:00 2001
From: itsmartashub <44645238+itsmartashub@users.noreply.github.com>
Date: Sat, 14 Dec 2024 22:36:18 +0100
Subject: [PATCH 40/44] fix(canvas/editor): apply style to `X more edits` btn
in history of edits (#89, #86)
- Ensure styles are applied to the `x more edits` button in the history of edits by selecting the element with `[aria-label^="Button to scroll the next edit into view"]`
Changes summary:
- Fixed the issue where styles were not applied to the `x more edits` button in the history of edits in Text Canvas, ensuring consistent visual appearance.
---
src/sass/elements/_canvas.scss | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/sass/elements/_canvas.scss b/src/sass/elements/_canvas.scss
index 12be3e0b..75d90ae5 100644
--- a/src/sass/elements/_canvas.scss
+++ b/src/sass/elements/_canvas.scss
@@ -245,9 +245,10 @@
}
/* Floating balloons, like "1 more edit" */
- .bg-token-main-surface-primary.border-token-main-surface-tertiary[aria-label="Button to scroll the next edit into view"] {
- --main-surface-primary: hsla(var(--accent-hsl) / .12) !important;
- border-color: hsla(var(--accent-hsl) / .1) !important;
+ .bg-token-main-surface-primary.border-token-main-surface-tertiary[aria-label^="Button to scroll the next edit into view"] {
+ --main-surface-primary: hsla(var(--accent-hsl) / .15) !important;
+ --main-surface-secondary: hsla(var(--accent-hsl) / .3) !important;
+ border-color: hsla(var(--accent-hsl) / .12) !important;
color: var(--c-accent) !important;
backdrop-filter: blur(10px);
}
From 3aefa0858595f9dd6f56ad10fc153490c845c016 Mon Sep 17 00:00:00 2001
From: itsmartashub <44645238+itsmartashub@users.noreply.github.com>
Date: Sun, 15 Dec 2024 00:35:47 +0100
Subject: [PATCH 41/44] fix(canvas/overlay): resolve chat overlay issue in
light theme on Firefox (#93, #86)
- Address the overlay issue that appears over the chats container when the canvas is opened in the light theme and using Firefox
- Ensure the overlay does not obstruct user interactions and is visually consistent
[The issue arises because I'm using the [class^="bg-black"] selector to apply a full bg color, but in this case, the element is semi-transparent. I'm still unsure why OpenAI is utilizing this element and why it's fully transparent specifically for the dark theme.]
Changes summary:
- Fixed the issue where an overlay appeared over the chats container in the light theme on Firefox, ensuring it does not obstruct user interactions and is visually consistent.
---
src/sass/global/_colors-bgs.scss | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/sass/global/_colors-bgs.scss b/src/sass/global/_colors-bgs.scss
index 939d4e1e..edb864f2 100644
--- a/src/sass/global/_colors-bgs.scss
+++ b/src/sass/global/_colors-bgs.scss
@@ -168,14 +168,23 @@ This content may violate our Terms of Use or usage policies. is bg-orange-400 no
- Prompt textarea send button
- GPTs - active pill ("Top Picks")
*/
-// .bg-black,
-[class*='bg-black'],
+.bg-black,
+// [class*='bg-black'],// @@@@@ THIS MAKES CHATS NOT VISIBLE IN FIREFOX ON LIGHT THEME
.bg-token-sidebar-surface-primary {
background-color: var(--c-surface-1);
+ // background-color: orange;
// @include borderBoxShadow(lightgreen);
// background-color: lightgreen;
}
+/* @@@@@ DEBUG FIREFOX - THIS MAKES CHATS NOT VISIBLE IN FIREFOX ON LIGHT THEME */
+/* [class*='bg-black'] {
+ outline: 2px solid red !important;
+ border: 2px solid red !important;
+ background: red !important;
+ box-shadow: 0 0 0 4px red !important;
+} */
+
/*
- Builder profile "PlaceholderGPT" - var(--c-surface-3)
- GPTs - Search input and search query bg - var(--c-surface-2)
From 552d1f135a78d6f3f8dc23a2fc120612fe77bfc9 Mon Sep 17 00:00:00 2001
From: itsmartashub <44645238+itsmartashub@users.noreply.github.com>
Date: Sun, 15 Dec 2024 01:03:30 +0100
Subject: [PATCH 42/44] feat(canvas/text-markdown): update background of code
blocks to match the theme (#89, #86)
- Update the background of markdown code blocks in the Text Canvas to better match the theme
Changes summary:
- Updated the background of markdown code blocks in the Text Canvas to better match the theme for improved visual consistency.
---
src/sass/elements/_canvas.scss | 66 ++++++++++++++++++----------------
1 file changed, 35 insertions(+), 31 deletions(-)
diff --git a/src/sass/elements/_canvas.scss b/src/sass/elements/_canvas.scss
index 75d90ae5..8119c64a 100644
--- a/src/sass/elements/_canvas.scss
+++ b/src/sass/elements/_canvas.scss
@@ -1,41 +1,39 @@
/* ______ CODE CANVAS: CM CodeMirror EDITOR */
-#codemirror {
- .cm-editor {
-
- // .ΝΌ1p.cm-focused .cm-selectionBackground, .ΝΌ1p .cm-line::selection, .ΝΌ1p .cm-selectionLayer .cm-selectionBackground, .ΝΌ1p .cm-content ::selection {
- // background: #6199ff2f !important;
- // }
- .cm-content {
- caret-color: var(--c-accent) !important;
-
- ::selection,
- .cm-selectionLayer .cm-selectionBackground,
- // .cm-line span.cm-focused .cm-selectionBackground,
- .cm-line > *::selection,
- .cm-line::selection {
- // background: var(--c-accent) !important;
- // color: var(--c-on-accent) !important;
- background: hsla(var(--accent-hsl) / .14) !important;
- color: var(--c-accent) !important;
- }
+.cm-editor {
+
+ // .ΝΌ1p.cm-focused .cm-selectionBackground, .ΝΌ1p .cm-line::selection, .ΝΌ1p .cm-selectionLayer .cm-selectionBackground, .ΝΌ1p .cm-content ::selection {
+ // background: #6199ff2f !important;
+ // }
+ .cm-content {
+ caret-color: var(--c-accent) !important;
+
+ ::selection,
+ .cm-selectionLayer .cm-selectionBackground,
+ // .cm-line span.cm-focused .cm-selectionBackground,
+ .cm-line > *::selection,
+ .cm-line::selection {
+ // background: var(--c-accent) !important;
+ // color: var(--c-on-accent) !important;
+ background: hsla(var(--accent-hsl) / .14) !important;
+ color: var(--c-accent) !important;
}
+ }
- &,
- .cm-gutters {
- background-color: var(--c-bg-cm) !important;
- }
+ &,
+ .cm-gutters {
+ background-color: var(--c-bg-cm) !important;
+ }
- .cm-activeLineGutter {
- background-color: hsla(var(--accent-hsl) / .2) !important;
- color: var(--c-accent) !important;
- }
+ .cm-activeLineGutter {
+ background-color: hsla(var(--accent-hsl) / .2) !important;
+ color: var(--c-accent) !important;
+ }
- .cm-line {
- [class^="_modelCursor"]::after {
- color: var(--c-accent);
- }
+ .cm-line {
+ [class^="_modelCursor"]::after {
+ color: var(--c-accent);
}
}
}
@@ -47,6 +45,12 @@
.from-token-main-surface-primary {
--main-surface-primary: var(--c-bg-cm) !important;
}
+
+ .cm-editor {
+ background-color: var(--c-surface-2) !important;
+ border-radius: var(--br);
+ border: 1px solid var(--c-border);
+ }
}
/* Canvas with CodeMirror (for code) and ProseMirror (for text) showed on the left (when open canvas)
From f40019dcb5fa11e32f7513b86e36adb1f7a587db Mon Sep 17 00:00:00 2001
From: itsmartashub <44645238+itsmartashub@users.noreply.github.com>
Date: Sun, 15 Dec 2024 15:35:39 +0100
Subject: [PATCH 43/44] fix(canvas/chats): ensure chat bubbles design is
consistent in all scenarios (#86)
- Update the `[data-message-author-role='assistant']` selector to target GPT chat bubbles with `.agent-turn`
- Ensure chat bubbles maintain their design when editing is stopped or when there is only one line in the chat bubble
- This was specially noticable and not so pleasent in =< `md` bp when canvas is opened or in smaller screen sizes
Changes summary:
- Fixed the issue where chat bubbles did not have the correct design in certain scenarios, such as when editing is stopped or when there is only one line in the chat bubble, by updating the selector to target GPT chat bubbles with `.agent-turn`.
---
src/sass/elements/_right--main.scss | 56 +++++------------------------
1 file changed, 9 insertions(+), 47 deletions(-)
diff --git a/src/sass/elements/_right--main.scss b/src/sass/elements/_right--main.scss
index aec095b8..f301a07d 100644
--- a/src/sass/elements/_right--main.scss
+++ b/src/sass/elements/_right--main.scss
@@ -257,7 +257,10 @@ main [role='presentation'] {
}
/* @ RIGHT - CHATS BUBBLES - GPT */
- &:has([data-message-author-role='assistant']) {
+ // &:has([data-message-author-role='assistant']) {
+ // ! I HAVE TO CHANGE THE ASSISTENT SELECTOR to ".agent-turn" BCS IT DOESNT EXIST AT SOME SCENARIOS (e.g. when there is canvas only ([id^="textdoc-message"]), without markdown too, when the user stop py Code canvas editing, etc...
+ &:has(.agent-turn) {
+ // border: 2px solid red !important;
/* ! Without this there was strange issue with User's chat overlaping the menu for "GPT-4" or "GPT-3.5" to choose model in gpt's chat bubble' footer - ONLY FOR MOBILE which is even more strange!!!
Ako neogranicimo ovo samo za mobile, na desktopu ce GPT chat da ide preko sticky headera!! Dok je u mobile ok valjda */
@@ -268,9 +271,10 @@ main [role='presentation'] {
}
/* RIGHT - CHATS BUBBLE BG
- - Adding .markdown here fix flash background of user chat bubble on first message */
- // & > div.text-base > div[class*="xl:max-w-[48rem]"] {
- & > div.text-base > div:first-child:has(.markdown) {
+ & > div.text-base > div[class*="xl:max-w-[48rem]"] { // ovo ne moze jer za mobile nema ove klase vec samo md:max-w-3xl
+ & > div.text-base > div[class*="md:max-w-3xl"] {
+ // ? Adding .markdown here fix flash background of user chat bubble on first message */
+ & > div.text-base > div:first-child:has(.markdown, [id^="textdoc-message"]) {
--pt-multiplier: 1.3;
background-color: var(--c-bg-msg-gpt);
@@ -537,46 +541,4 @@ body > .fixed.top-8.right-4 {
--text-primary: var(--c-on-accent) !important;
border-color: var(--c-accent) !important;
}
-}
-
-
-// @container article (max-width: $sm) {
-
-// [data-testid^='conversation-turn-'] {
-
-// & > div {
-// --px-chat-bubble-edge-gap: 0.4rem !important;
-// }
-
-// .mx-auto.flex.flex-1.text-base[class*="md:max-w-3xl"] {
-// --p-chat-bubble: 0.5rem !important;
-// --br-chat-bubble: var(--br) !important;
-// // background-color: red !important;
-// // border: 4px solid orange !important;
-// width: 100% !important;
-
-// .flex-shrink-0.flex.flex-col.items-end:has(.gizmo-bot-avatar, .gizmo-shadow-stroke) {
-// // background-color: red !important;
-// display: none !important;
-// }
-
-// }
-
-// &:has([data-message-author-role='user']) [class*='bg-token-message-surface'] {
-// width: 100% !important;
-// max-width: 100% !important;
-// }
-
-// &:has([data-message-author-role='assistent']) {
-// border: 2px solid red !important;
-// }
-
-// }
-
-// [data-testid^="conversation-turn-"]:has([data-message-author-role="assistant"]) > div.text-base > div:first-child:has(.markdown) .agent-turn.relative.flex.w-full.flex-col {
-// width: 100% !important;
-// border: 2px solid red !important;
-
-// }
-
-// }
\ No newline at end of file
+}
\ No newline at end of file
From 16d56fb2c8d1481932c496768a315e9ce7e2b208 Mon Sep 17 00:00:00 2001
From: itsmartashub <44645238+itsmartashub@users.noreply.github.com>
Date: Sun, 15 Dec 2024 17:50:09 +0100
Subject: [PATCH 44/44] fix(gpth/colors): correct typo in `Reset Fonts` btn to
`Reset Colors`
- Change the button text from "Reset Fonts" to "Reset Colors" in the Colors customization settings
Changes summary:
- Fixed the typo in the "Reset Fonts" button to "Reset Colors" in the Colors customization settings for clarity and accuracy.
---
src/js/app/mainColors.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/js/app/mainColors.js b/src/js/app/mainColors.js
index 512af506..c4c9e3b0 100644
--- a/src/js/app/mainColors.js
+++ b/src/js/app/mainColors.js
@@ -28,7 +28,7 @@ const renderColorsTab = `
`