Skip to content

Commit

Permalink
refactor(dialog): Revamp Upgrade Your Plan dialog (#44)
Browse files Browse the repository at this point in the history
- Revamp the design and layout of the "Upgrade Your Plan" dialog (#44)

Changes summary:
- Revamped the "Upgrade Your Plan" dialog:
  - Improved the visual design and layout to provide a clearer presentation of subscription plans.
  • Loading branch information
itsmartashub committed Aug 29, 2024
1 parent bf8e902 commit 362b999
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 37 deletions.
13 changes: 7 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

57 changes: 27 additions & 30 deletions src/sass/elements/_dialogs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -104,36 +104,14 @@
font-size: 0.68rem !important;
}

/* DIALOG - "Upgrade your plan" only */
&:has(a[href="https://openai.com/enterprise"], [data-testid*="-pricing-modal-column"]) {
--popover-surface-primary: var(--c-bg-dialog) !important; // Dialog bg
padding: 0 !important;
border: none !important;

/* Ugly bg behind text in Plans */
.bg-token-main-surface-primary {
--main-surface-primary: var(--c-bg-dialog) !important;
background-color: var(--main-surface-primary);
}

/* Border radius for "Upgrade your plan" dialog */
.rounded-md {
border-radius: var(--br-dialog) !important;
}

/* Stroke color for ✔️ in "Upgrade your plan" dialog list */
svg[stroke='currentColor']:has(polyline) {
stroke: var(--c-accent) !important;
}
/* ___ Dialog - "Upgrade your plan" */
// &.bg-payment-modal {
&:has(a[href="https://openai.com/enterprise"]) {
border-radius: 0 !important;

/* See "ChatGPT Enterprise" */
a[href="https://openai.com/enterprise"] {
color: var(--c-accent) !important;
[aria-label="Toggle for switching between Personal and Business plans"] {
background-color: hsla(var(--accent-hsl) / 0.1) !important;
}
}

/* "Upgrade yur plan" verzja koja ima Personal i Bussiness switching buttons */
&:has(button[aria-label*='Toggle for switching to Personal plans']) {

/* "Personal" and "Business" switching buttons */
button[aria-label*='Toggle for switching to Personal plans'],
Expand All @@ -144,8 +122,8 @@
color: var(--c-on-accent);

// style for element surround btn (in code its next to btn on the same block level, sibling), simulating the button, jeez...
& ~ .bg-token-text-primary {
--text-primary: var(--c-accent) !important;
& ~ .absolute.inset-0 {
--main-surface-primary: var(--c-accent) !important;
}
}

Expand All @@ -155,9 +133,28 @@
&:hover {
color: var(--c-accent) !important;
}
}
}

/* Free and Plus plans */
[data-testid*="-pricing-modal-column"] {
margin: 0.3rem !important;
box-shadow: var(--box-shadow);
background-color: hsla(var(--accent-hsl) / 0.1) !important;
backdrop-filter: blur(10px);
border: 1px solid hsla(var(--accent-hsl) / 0.12) !important;

/* Ugly bg behind text in Plans */
.bg-token-main-surface-primary {
--main-surface-primary: transparent !important;
// background-color: transparent !important;
}
}

/* See "ChatGPT Enterprise" */
a[href="https://openai.com/enterprise"] {
color: var(--c-accent) !important;
}
}

/* "CREATE WORKSPACE" dialog when clicked on "Team" for "Upgade your plan" which has input 'Acme Inc.'. */
Expand Down
4 changes: 3 additions & 1 deletion src/sass/elements/_right--main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,9 @@ main [data-testid^='conversation-turn-'] {
line-height: calc(var(--lineHeight) / 16) !important;
}

/* RIGHT - CHATS BUBBLE BG */
/* RIGHT - CHATS BUBBLE BG
- Adding .markdown here fix flash background of user chat bubble on first message
TODO I need to check if his also fix th "Which response do you prefer" wrapper design */
& > div.text-base > div:first-child:has(.markdown) {
background-color: var(--c-bg-msg-gpt);

Expand Down

0 comments on commit 362b999

Please sign in to comment.