Skip to content

feat(console): add shared Button component and PanelLeft/SquarePen icons#358

Merged
maxnoller merged 5 commits intomainfrom
extract-shared-button-icons
Apr 18, 2026
Merged

feat(console): add shared Button component and PanelLeft/SquarePen icons#358
maxnoller merged 5 commits intomainfrom
extract-shared-button-icons

Conversation

@maxnoller
Copy link
Copy Markdown
Member

Summary

No existing callers — this PR is pure additions. Consumers will land in follow-up PRs.

Test plan

  • tsc --noEmit clean
  • npm --workspace console run test

🤖 Generated with Claude Code

Max Noller and others added 2 commits April 18, 2026 14:54
Extracted from #323 as a foundation PR. Adds a reusable <Button>
primitive with variant/size props and two new lucide-style icons
exported from the icons barrel.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Covers the public contract: children, default type="button" and override,
variant/size class mapping, className merging, ref forwarding, and
prop forwarding (onClick, disabled, aria-label).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@maxnoller
Copy link
Copy Markdown
Member Author

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

Max Noller and others added 2 commits April 18, 2026 15:27
Follows the dropdown/sheet/sidebar convention of one folder per
component. No API changes — consumers still `import { Button } from
'.../components/button'`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adopts two patterns from Base UI's Button:

- `render` prop: swap the underlying element (e.g. render={<a href=...>})
  while keeping Button's styles and prop-forwarding. Kills the need for
  "link styled as a button" duplicates.
- `loading` prop: sets aria-busy + aria-disabled (not native disabled)
  so the button keeps focus for keyboard and screen-reader users during
  async work. onClick is guarded while loading or disabled.

Also exposes `data-disabled` / `data-loading` attributes and updates CSS
hover selectors so loading/aria-disabled states get the same dimmed
style as native disabled.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@maxnoller maxnoller requested a review from furukama April 18, 2026 13:33
maxnoller pushed a commit that referenced this pull request Apr 18, 2026
Extracted from #323. Depends on #358 for the shared Button and the
PanelLeft/SquarePen icons consumed by the sidebar header and new
view-switch control.

Behavior:
- Sidebar collapses to an icon-only rail on the chat page and restores
  to the full layout on navigation away
- Collapsed nav items show title tooltips; brand mark gets a tooltip too
- When collapsed on desktop, an expand trigger (aria-expanded="false")
  appears so keyboard users can restore the sidebar
- New view-switch component provides a dedicated toggle for chat vs
  admin surfaces, wired into the router

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@maxnoller maxnoller merged commit 376e423 into main Apr 18, 2026
5 checks passed
@maxnoller maxnoller deleted the extract-shared-button-icons branch April 18, 2026 21:45
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