-
Notifications
You must be signed in to change notification settings - Fork 0
chore: design tweaks #38
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "wtc": patch | ||
| --- | ||
|
|
||
| Design tweaks and cleanup. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| import { Show, type ParentProps } from "solid-js"; | ||
|
|
||
| import { tokens } from "../../tokens.ts"; | ||
|
|
||
| /** Props for a titled content card used to group related UI sections. */ | ||
| export interface CardProps extends ParentProps { | ||
| title?: string; | ||
| status?: string; | ||
| active?: boolean; | ||
| } | ||
|
|
||
| /** | ||
| * Full-rounded-border grouping container for content sections. | ||
| * | ||
| * Use `Card` for major visual groups (pinned task lists, settings sections, | ||
| * timer lists) and nest `ListItem` entries inside it. Avoid nesting Cards | ||
| * more than one level deep. | ||
| */ | ||
| export function Card(props: CardProps) { | ||
| return ( | ||
| <box | ||
| border | ||
| borderStyle="rounded" | ||
| borderColor={props.active ? tokens.borderFocus : tokens.border} | ||
| padding={1} | ||
| flexDirection="column" | ||
| gap={1} | ||
| > | ||
| <Show when={props.title}> | ||
| <box flexDirection="row" gap={1}> | ||
| <text fg={props.active ? tokens.accent : tokens.text}>{props.title}</text> | ||
| <Show when={props.status}> | ||
| <text fg={tokens.textDim}>{props.status}</text> | ||
| </Show> | ||
| </box> | ||
| </Show> | ||
|
|
||
| {props.children} | ||
| </box> | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| import { Show, type JSX } from "solid-js"; | ||
|
|
||
| import { tokens } from "../../tokens.ts"; | ||
|
|
||
| /** Props for a compact selectable list item inside a Card. */ | ||
| export interface ListItemProps { | ||
| id?: string; | ||
| title: string; | ||
| metadata?: readonly string[]; | ||
| selected?: boolean; | ||
| badge?: JSX.Element; | ||
| } | ||
|
|
||
| /** Separator used between inline metadata segments. */ | ||
| const METADATA_SEPARATOR = " • "; | ||
|
|
||
| /** | ||
| * Compact selectable entry for use inside a `Card`. | ||
| * | ||
| * Renders a thin left accent bar, title, optional inline metadata, and an | ||
| * optional right-aligned badge. Use for task entries, timer entries, and | ||
| * any other list-style content. | ||
| */ | ||
| export function ListItem(props: ListItemProps) { | ||
| const metadataLine = () => { | ||
| const parts = props.metadata; | ||
| if (!parts || parts.length === 0) return null; | ||
| return parts.join(METADATA_SEPARATOR); | ||
| }; | ||
|
|
||
| return ( | ||
| <box id={props.id} flexDirection="row" gap={1}> | ||
| <box width={1} backgroundColor={props.selected ? tokens.accent : undefined} /> | ||
|
|
||
| <box flexDirection="column" flexGrow={1} gap={0}> | ||
| <text fg={props.selected ? tokens.accent : tokens.text}> | ||
| {props.selected ? "● " : ""} | ||
| {props.title} | ||
| </text> | ||
|
|
||
| <Show when={metadataLine()}> | ||
| <text fg={tokens.textDim}>{metadataLine()}</text> | ||
| </Show> | ||
| </box> | ||
|
|
||
| <Show when={props.badge}> | ||
| <box justifyContent="flex-end">{props.badge}</box> | ||
| </Show> | ||
| </box> | ||
| ); | ||
| } |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.