Skip to content

feat(examples): add directory example with Canvas Kit and data bindings#24

Merged
jheddings merged 2 commits intomainfrom
feat/directory-example
Mar 30, 2026
Merged

feat(examples): add directory example with Canvas Kit and data bindings#24
jheddings merged 2 commits intomainfrom
feat/directory-example

Conversation

@jheddings
Copy link
Copy Markdown
Collaborator

Summary

  • Adds examples/directory/ — an Employee Directory plugin migrated from the we-next POC
  • Uses Canvas Kit (@workday/canvas-kit-react) for UI components with Roboto font and token CSS
  • Three pages: Home (dashboard with department stats), Employees (list + detail view), Spotlight (random employee)
  • Data bindings generated via everywhere bind . from local .businessobject model files
  • Typed hooks (useEmployees, useEmployee, useDepartments) backed by DataProvider + HttpResolver
  • Seed data in .data/ for local development with the viewer

Additional changes

  • Generator: Narrowed return types for generated hooks — list hooks return { data: T[] | null }, single-record hooks return { data: T | null }
  • StyleBoundary: Removed contain: style which was blocking CSS custom property inheritance from design systems like Canvas Kit

Test plan

  • 118 tests pass across 17 test files
  • just check passes (typecheck + lint)
  • Verified in viewer: Canvas Kit cards, fonts, stats, buttons render correctly
  • Run cd examples/directory && npm run preview — verify all three pages work
  • Click through employee list to detail view and back
  • Spotlight page shows random employees on "Meet Someone New" click

🤖 Generated with Claude Code

jheddings and others added 2 commits March 30, 2026 17:24
Migrates the we-next demo app as the "directory" example plugin:
- Employee/Department .businessobject model files and seed data
- Home dashboard, employee list with detail, and spotlight pages
- Canvas Kit components with Roboto font and token CSS
- DataProvider + HttpResolver wired through the plugin provider
- Generated typed hooks via `everywhere bind .`

Also narrows generated hook return types (list vs single) and removes
CSS style containment from StyleBoundary to allow CSS custom properties
from design systems like Canvas Kit to inherit correctly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Seed data and local bind config are machine-specific and should not be
committed. Removes the accidentally tracked files from the directory
example.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jheddings jheddings merged commit bca4a89 into main Mar 30, 2026
2 checks passed
@jheddings jheddings deleted the feat/directory-example branch March 30, 2026 23:29
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.

1 participant