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

v1.1 UI updates #29

Merged
merged 37 commits into from
May 8, 2024
Merged

v1.1 UI updates #29

merged 37 commits into from
May 8, 2024

Conversation

fiveoutofnine
Copy link
Owner

@fiveoutofnine fiveoutofnine commented May 7, 2024

@/components/ui

  • <Accordion /> 🆕
  • <Avatar /> 🆕
  • <Badge />
    • Add type: "text" | "number" prop (number has smaller x-padding)
    • Add type-checked intent="black" and intent="white" variants
    • Add data attribute data-length-one if children implements .toString() and returns length 1
    • Update variant="primary"'s dark:text-white and text-black to just text-white for accessibility and consistency (inverted for intent="warning")
    • Update variant="secondary"'s text-*-9 to text-*-11 for accessibility and consistency
    • Render <Badge /> as <span> instead of <div>
    • Ensure <Badge /> has a minimum aspect ratio of 1 / 1
    • Refactor intent="primary" $\rightarrow$ intent="info"
  • <Button />
    • Add <ButtonGroup /> 🆕 and corresponding interactive styles (hover:* and focus-visible:*)
    • Add default newTab=false
    • Add type-checked variant="solid" & { intent="black" | "white" } variants
    • Add button-left-icon="", button-right-icon="", and button-content="" selectors
    • Update variant="primary"'s dark:text-white and text-black to just text-white for accessibility and consistency (inverted for intent="warning")
    • Update variant="outline" | "ghost" | "text"'s text-*-9 to text-*-11 and add bg-transparent for accessibility and consistency
    • Update size="xl"'s rounded to rounded-md
    • Remove cursor-not-allowed and add pointer-events-none to disabled=true variants
    • Refactor intent="primary" $\rightarrow$ intent="info"
  • <Checkbox /> 🆕
  • <CodeBlock />
    • Add logo, breakLines, and switcher props
    • Add diff syntax highlighting
    • Refactor "copy to clipboard" button to ./actions w/ source switcher
    • Animate <Copy />/<Check /> icons on copy
    • Display closable, intent="success" toast on copy
  • <Command /> 🆕
  • <Dialog /> 🆕
    • Bump @radix-ui/react-dialog ^1.0.4 $\rightarrow$ ^1.0.5 (latest)
  • <Drawer /> 🆕
  • <Dropdown /> 🆕
  • <Form /> 🆕
  • <HoverCard />
    • Bump @radix-ui/react-hover-card ^1.0.6 $\rightarrow$ ^1.0.7 (latest)
    • Add inPortal, triggerProps, defaultOpen, open, onOpenChange as props to preserve component API
  • <IconButton />
    • Inherit all styles from <Button /> for consistency and code cleanliness
    • Refactor intent="primary" $\rightarrow$ intent="info"
  • <Input /> 🆕
  • <Popover /> 🆕
  • <Radio /> 🆕
  • <Select />
    • Inherit all styles from <Button /> for consistency and code cleanliness
    • Add comments for pl-*, pr-*, and right-* values
    • Add fullWidth prop
    • Add type-checked variant="solid" & { intent="black" | "white" } variants
    • Add select-content="" selector
    • Update variant="primary"'s dark:text-white and text-black to just text-white for accessibility and consistency (inverted for intent="warning")
    • Update variant="outline" | "ghost"'s text-*-9 to text-*-11 for accessibility and consistency
    • Remove <Select.Item /> (in favor of the HTML-native <option>)
    • Make the component a React.ForwardedRef
    • Refactor intent="primary" $\rightarrow$ intent="info"
  • <Switch /> 🆕
  • <Table /> 🆕
  • <Tabs /> 🆕
    • Bump @radix-ui/react-tabs ^1.0.3 $\rightarrow$ ^1.0.4 (latest)
  • <TextArea /> 🆕
  • <Toaster /> and toast
    • Refactor intent="primary" $\rightarrow$ intent="info"
    • Refactor @/components/ui/toaster $\rightarrow$ @/components/ui/toast
    • Refactor useToast $\rightarrow$ toast and imports
    • Replace @radix-ui/react-toast with sonner for smoother animations and performance (see Sonner docs for API changes)
    • action now takes the form of ReactNode | Action, where type Action = { label: string; onClick: () => void }
    • Place <Toaster /> higher in the component tree
    • Add hasCloseButton prop (note: this button will show on hover if on a non-touchscreen device, and always be displayed otherwise)
  • <Tooltip />
    • Bump @radix-ui/react-tooltip ^1.0.5 $\rightarrow$ ^1.0.7 (latest)
    • Add inPortal, triggerProps, defaultOpen, open, onOpenChange as props to preserve component API

Miscellaneous

  • Update code convention
    • Remove imports for React types (e.g. FC $\rightarrow$ React.FC)
    • Remove unnecessary displayNames
    • Add exports comment divider in @/components/ui/*/index.tsxs
  • Update dependencies
  • Update <Logo /> hover styles to border color indicator
  • Fix <Logo /> focus state
  • Apply focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-9 to button in globals.css

Copy link

vercel bot commented May 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
www-xq0s ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 8, 2024 10:24pm

@fiveoutofnine fiveoutofnine changed the title v1.1 UI updates v1.1 design system updates May 8, 2024
@fiveoutofnine fiveoutofnine changed the title v1.1 design system updates v1.1 UI updates May 8, 2024
@fiveoutofnine fiveoutofnine merged commit dbc4264 into v1.1 May 8, 2024
2 checks passed
@fiveoutofnine fiveoutofnine deleted the v1.1-ui branch May 8, 2024 22:27
@sudo-owen
Copy link

lgtm

fiveoutofnine added a commit that referenced this pull request May 18, 2024
* feat: pnpm -> bun

* chore: add walletconnect project id

* chore: update

* feat: update deps and delete everything

* feat: update all deps

* feat: ini nav bar

* feat: add connect button

* feat: add header

* feat: `<ChessFeature />`

* fix: `font-weight: 300` -> `400`

* chore: `FC` -> `React.FC`

* feat: add link features

* chore: delete unused code

* fix: make nav-bar highlight selected page

* refactor: naming

* feat: error pages

* fix: add @fiveoutofnine tweet ID

* feat: add `<TxDotCoolFeature />` w/o functionality

* feat: add `<TypingFeature />` w/o functionality

* perf: move randomization to server-side

* fix: add `pino-pretty` as external webpack config

* chore: register base

* feat: add `<ColormapRegistry />`

* chore: ini `<RunningFeature />`

* v1.1 UI updates (#29)

* chore: ini `<RunningFeature />`

* feat: modernize `<Badge />`

* fix(`Badge />`): use `text-white`/`text-black` on `intent="primary"`

* feat: modernize `<Button />`

* chore: cleaner `@/components/ui` exports

* fix: `<ConnectButton />` button props type error

* feat: modernize `<IconButton />`

* feat: modernize `<Select />`

* feat: modernize `<HoverCard />`

* feat: add `<Avatar />`

* fix: make logo hover styles consistent

* feat: add `<Accordion />`

* feat: add `<Checkbox />`

* chore: update

* feat: add `<Radio />`

* feat: add `<Switch />`

* fix: make checked styles consistent

* fix: `intent="primary"` -> `intent="info"

* chore: update

* chore: update

* feat: add `intent="white"`

* feat: modernize `<Tooltip />`

* feat: modernize `<Toaster />` and `toast`

* chore: update

* feat: add `<TextArea />`

* fix: adjust text area padding

* feat: add `<Input />`

* feat: add `<Popover />`

* feat: modernize `<CodeBlock />`

* feat: add `<Table />`

* feat: add `<Tabs />`

* fix: focus state on logo

* feat: add `<Command />` and `<Dialog />`

* feat: add `<Drawer />`

* feat: add `<Form />`

* feat: add `<Dropdown />`

* fix: dropdown disabled states

* chore: bump deps

* fix: remove unnecessary tooltip

* feat: add multichain sending functionality to tx.cool feature

* chore: update

* chore: update

* chore: update

* feat: add colormap definitino viewer

* feat: add colormap ID copy

* feat: ini `<RunningFeature />`

* feat: add supabase type gen (#30)

* feat: add supabase type gen

* fix: lint

* chore: run lint

* feat: impl running bar chart

* fix: hydration

* fix: display time only to last-updated data

* chore: delete unused file

* feat: ini running heatmap

* v1.1 `/design` (#31)

* feat: ini running heatmap

* feat: ini /design layout

* fix: add more visual hierarchy and consistency to nav bar

* chore: migrate `<DesignPageNav />`

* feat: ini mdx

* feat: ini first page

* feat: ini MDX components

* feat: add `<pre>`

* feat: add `<a>`, `<code>`, `<p>`

* feat: add design component display accordion

* feat: use existing `ToastProps`

* chore: update metadata

* chore: update metadata

* chore: update metadata

* chore: add small animation

* fix: add `backdrop-blur` to `<CodeBlock />` UI actions

* chore: migrate color.mdx

* chore: fix button intent

* fix: color scale hover styles

* chore: update OG image generation to new colors

* chore: delete unused files

* feat: `<Callout />` component

* feat: add metadata export

* docs: update colors

* fix: `code` styles

* chore: add blog page

* fix: running bar chart tabs

* feat: add running heatmap

* chore: twitter -> X

* chore: update bio

* fix: scroll padding

* chore: update

* fix: close navbar drawer on navigation

* fix: `ariaLabel` -> `aria-label`

* v1.1 `/design` docs (#32)

* docs: add /`design/libraries`

* docs: edit `/design/colors` content

* docs: edit `/design/badge` content

* docs: edit `/design/button` content

* docs: add `<CodeBlock />` content

* fix: hard code in display name

* docs: edit `<CodeBlock />` content

* chore: update

* docs: add `<Tooltip />` content

* docs: add `<Toast />` content

* docs: add `<Select />` content

* docs: add `<HoverCard />` content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants