Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: CI

on:
push:
branches: [ main ]
pull_request:
workflow_call:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: '24'

- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install Dependencies
run: bun install

- name: Lint
run: bun run lint:check

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: '24'

- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install Dependencies
run: bun install

- name: Install Playwright browser
run: bunx playwright install --with-deps chromium

- name: Run Tests
run: bun run test
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@ permissions:
pull-requests: write

jobs:
# Re-run lint + tests at merge time; the release is gated on them passing.
ci:
if: github.event.pull_request.merged == true
uses: ./.github/workflows/ci.yml

release:
needs: ci
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
Expand Down
5 changes: 3 additions & 2 deletions src/components/composite/resource-filters.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { SearchField, SearchInput } from "@offload-project/hallogen/search-field";
import { Toolbar, ToolbarLeft, ToolbarRight } from "@offload-project/hallogen/toolbar";
import type { ReactNode, SubmitEvent } from "react";
import type { Key } from "react-aria-components";
import { SearchField } from "react-aria-components/SearchField";
import { ResourceClearFilters } from "@/components/composite/resource-clear-filters";
import { SearchInput } from "@/components/ui/search-field.tsx";
import { TableColumnMenu } from "@/components/ui/table.tsx";
import { Toolbar, ToolbarLeft, ToolbarRight } from "@/components/ui/toolbar.tsx";
import type { ColumnDef } from "@/types";

interface Props {
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/choice-box.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ interface ChoiceBoxItemProps extends GridListItemProps, VariantProps<typeof choi
}

const ChoiceBoxItem = ({ className, label, description, children, ...props }: ChoiceBoxItemProps) => {
const textValue = typeof children === "string" ? children : undefined;
const textValue = typeof children === "string" ? children : (props.textValue ?? label);
const { columns, isReadOnly } = useChoiceBoxContext();
return (
<GridListItem
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ interface DropdownItemProps extends ListBoxItemProps {
}

const DropdownItem = ({ className, children, variant, ...props }: DropdownItemProps) => {
const textValue = typeof children === "string" ? children : undefined;
const textValue = typeof children === "string" ? children : props.textValue;
return (
<ListBoxItemPrimitive
textValue={textValue}
Expand Down
11 changes: 7 additions & 4 deletions src/components/ui/tracker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@ const Block = ({ color, tooltip, disabledTooltip, defaultBackgroundColor = "bg-s
) : (
<Tooltip isOpen={open} onOpenChange={setOpen} delay={0} closeDelay={0}>
<Pressable onClick={() => setOpen(true)}>
<div className="size-full overflow-hidden px-[0.5px] transition first:rounded-s-sm first:ps-0 last:rounded-e-sm last:pe-0 sm:px-px">
<button
type="button"
aria-label={tooltip}
className="size-full cursor-pointer overflow-hidden px-[0.5px] transition first:rounded-s-sm first:ps-0 last:rounded-e-sm last:pe-0 sm:px-px">
<div className={twJoin("size-full rounded-[1px]", color || defaultBackgroundColor, "hover:opacity-50")} />
</div>
</button>
</Pressable>
<TooltipContent arrow={false} offset={10} placement="top" inverse className="px-2 py-1.5 text-xs">
{tooltip}
Expand All @@ -40,8 +43,8 @@ interface TrackerProps extends ComponentProps<"div">, Pick<TrackerBlockProps, "d
const Tracker = ({ data = [], disabledTooltip = false, className, ref, ...props }: TrackerProps) => {
return (
<div ref={ref} className={twMerge("group flex h-8 w-full items-center", className)} {...props}>
{data.map((props, index) => (
<Block disabledTooltip={disabledTooltip} key={props.key ?? index} {...props} />
{data.map(({ key, ...block }, index) => (
<Block disabledTooltip={disabledTooltip} key={key ?? index} {...block} />
))}
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion src/stories/context-menu.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const meta = {
<ContextMenuTrigger className="grid h-32 w-64 place-content-center rounded-lg border border-dashed text-muted-fg text-sm">
Right click here
</ContextMenuTrigger>
<ContextMenuContent>
<ContextMenuContent aria-label="Actions">
<ContextMenuItem id="cut">Cut</ContextMenuItem>
<ContextMenuItem id="copy">Copy</ContextMenuItem>
<ContextMenuSeparator />
Expand Down
2 changes: 1 addition & 1 deletion src/stories/dropdown.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const meta = {
New file
</DropdownItem>
<DropdownItem id="copy">Copy link</DropdownItem>
<DropdownItem id="edit">
<DropdownItem id="edit" textValue="Edit">
<DropdownLabel>Edit</DropdownLabel>
<DropdownDescription>Make changes to this item</DropdownDescription>
</DropdownItem>
Expand Down
Loading