Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Nudges to ticket copy page

Terry Suttonf3366506a911
diff --git a/apps/www/components/LaunchWeek/Ticket/ticket-copy.module.css b/apps/www/components/LaunchWeek/Ticket/ticket-copy.module.css
index f9a49f205fd..65007c67559 100644
--- a/apps/www/components/LaunchWeek/Ticket/ticket-copy.module.css
+++ b/apps/www/components/LaunchWeek/Ticket/ticket-copy.module.css
@@ -117,7 +117,7 @@
display: none;
}
-.fade {
+/* .fade {
position: absolute;
background: linear-gradient(90deg, rgba(37, 39, 41, 0%) 0%, #252729 100%);
top: 0;
@@ -128,7 +128,7 @@
display: block;
border-radius: var(--space-2x);
pointer-events: none;
-}
+} */
.desktop-copy.desktop-copy-disabled {
display: none;
diff --git a/apps/www/components/LaunchWeek/Ticket/ticket-copy.tsx b/apps/www/components/LaunchWeek/Ticket/ticket-copy.tsx
index 3ec81fbb729..b823be4e7ad 100644
--- a/apps/www/components/LaunchWeek/Ticket/ticket-copy.tsx
+++ b/apps/www/components/LaunchWeek/Ticket/ticket-copy.tsx
@@ -4,6 +4,7 @@ import { SITE_URL } from '~/lib/constants'
import styleUtils from './utils.module.css'
// import IconCopy from '~/components/LaunchWeek/Ticket/icons/icon-copy'
import styles from './ticket-copy.module.css'
+import { IconCopy, IconCheck } from 'ui'
type Props = {
username: string
@@ -23,20 +24,26 @@ export default function TicketCopy({ username }: Props) {
}
}, [])
- const copiedText = (
- <span
- className={cn(styles.copied, {
- [styles.visible]: copied,
- })}
- >
- Copied!
- </span>
- )
+ console.log({ copied })
+
+ const copiedText = <span className="absolute -right-2 text-xs">Copied!</span>
+
+ // background: none;
+ // outline: none;
+ // border: none;
+ // z-index: 2;
+ // border-radius: var(--space-2x);
+ // width: 40px;
+ // display: flex;
+ // align-items: center;
+ // justify-content: center;
+ // margin-right: -10px;
const copyButton = (
<button
type="button"
- className={styles['copy-button']}
+ name="Copy"
+ className="w-24 flex items-center -mr-4 cursor-pointer z-10"
ref={buttonRef}
onClick={() => {
navigator.clipboard.writeText(url).then(() => {
@@ -47,28 +54,24 @@ export default function TicketCopy({ username }: Props) {
})
}}
>
- {/* <IconCopy /> */}
+ {copied ? <IconCheck /> : <IconCopy />}
</button>
)
return (
<div className={cn(styles.wrapper, styleUtils.appear)}>
- <div className={styles['label-wrapper']}>
- <div className={styles.label}>Your ticket URL:</div>
+ <div className="flex gap-4 items-center max-w-md justify-between">
+ <div className="font-bold">Your ticket URL:</div>
<div
className={cn(styles['mobile-copy'], {
[styles['mobile-copy-disabled']]: !copyEnabled,
})}
>
- {copiedText}
+ {copied && copiedText}
{copyButton}
</div>
</div>
- <div
- className={cn(styles.field, {
- [styles['desktop-copy-disabled']]: !copyEnabled,
- })}
- >
+ <div className="flex items-center ml-4">
<span
className={styles.url}
ref={scrollRef}
@@ -95,12 +98,8 @@ export default function TicketCopy({ username }: Props) {
})}
style={{ opacity: fadeOpacity }}
/>
- <div
- className={cn(styles['desktop-copy'], styleUtils['hide-on-mobile'], {
- [styles['desktop-copy-disabled']]: !copyEnabled,
- })}
- >
- {copiedText}
+ <div className="relative">
+ {copied && copiedText}
{copyButton}
</div>
</div>
diff --git a/apps/www/components/LaunchWeek/Ticket/ticket-form.tsx b/apps/www/components/LaunchWeek/Ticket/ticket-form.tsx
index 2dfbbf186d3..14adabc39fd 100644
--- a/apps/www/components/LaunchWeek/Ticket/ticket-form.tsx
+++ b/apps/www/components/LaunchWeek/Ticket/ticket-form.tsx
@@ -75,7 +75,7 @@ export default function Form({ defaultUsername = '', setTicketGenerationState }:
// }
}}
>
- <p className={`${username && 'text-scale-500'}`}>
+ <p className={`${username && 'text-scale-900'}`}>
{username ? 'Done!' : 'Connect with GitHub'}
</p>
{username ? (
@@ -85,7 +85,7 @@ export default function Form({ defaultUsername = '', setTicketGenerationState }:
) : null}
</button>
{!username && (
- <p className={'text-xs text-scale-300 dark:text-scale-900 pl-1'}>
+ <p className={'text-xs text-scale-700 dark:text-scale-900 pl-1'}>
Only public info will be used.
</p>
)}