https://github.com/backnotprop/plannotator-stack-fixture
https://github.com/backnotprop/plannotator-stack-fixture
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/backnotprop/plannotator-stack-fixture
- Owner: backnotprop
- Created: 2026-04-26T01:01:53.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2026-04-26T03:22:23.000Z (2 months ago)
- Last Synced: 2026-04-26T05:15:17.539Z (2 months ago)
- Language: TypeScript
- Size: 15.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# plannotator-stack-fixture
Fixture repo for testing stacked PR review UX in Plannotator.
## User Model
Users have a `role` (`admin | editor | viewer`) and a `status` (`active | suspended | pending`).
```ts
import { createUser } from "./src/user";
const user = createUser({
id: "u-001",
name: "Ada Lovelace",
email: "ada@example.com",
role: "editor",
status: "active",
});
```
### Utilities
| Function | Description |
|---|---|
| `createUser(params)` | Construct a normalized `User` |
| `normalizeUserId(id)` | Lowercase + trim a user ID |
| `isActiveUser(user)` | Check active status |
| `formatDisplayName(user)` | Name or email prefix |
| `formatUserLabel(user)` | `"Name (Role)"` string |