|
| 1 | +# Orcid Registry UI — Agent Notes (for future GPTs) |
| 2 | + |
| 3 | +This package (`projects/orcid-registry-ui`, published as `@orcid/registry-ui`) contains **feature-oriented UI components** for the main orcid-angular application only. It is not intended for reuse outside this project. |
| 4 | + |
| 5 | +> **Note for future agents:** This file is intended to be edited over time. Any section—relevant or not—may be updated, trimmed, or reorganized so the document stays lean and useful for future agents. Prefer keeping only what helps the next AI work effectively with this library. |
| 6 | +
|
| 7 | +## Library scope: orcid-registry-ui vs orcid-ui |
| 8 | + |
| 9 | +- **orcid-ui** (`@orcid/ui`): Fully **agnostic** UI building blocks. No feature names or domain-specific wording. Open source–friendly and reusable across any ORCID or non-ORCID project. Components use Angular Material when possible and design tokens for styling. |
| 10 | + |
| 11 | +- **orcid-registry-ui** (`@orcid/registry-ui`): **Registry-specific** components for the orcid-angular app only. May use feature names (e.g. “Import your works”, “Permission notifications”). Builds on **orcid-ui** components, Angular Material, and **orcid-tokens**. More flexible and app-coupled. |
| 12 | + |
| 13 | +## Conventions |
| 14 | + |
| 15 | +- **Package entry**: `projects/orcid-registry-ui/src/public-api.ts` |
| 16 | +- **Components**: `projects/orcid-registry-ui/src/lib/components/**` |
| 17 | +- Prefer **standalone components**. Use `@orcid/ui` for base primitives (modals, action surfaces, etc.) and **orcid-tokens** CSS variables for layout/color/typography. |
| 18 | +- Dialogs that use the shared modal chrome should use `OrcidModalComponent` and `ORCID_MODAL_DIALOG_PANEL_CLASS` from `@orcid/ui` when opening with `MatDialog`. |
| 19 | +- **Dialog data (MAT_DIALOG_DATA):** If the host may open the dialog first and assign full data later (e.g. after an async request), the data interface can include an optional flag (e.g. `loading?: boolean`) so the dialog can show a skeleton or placeholder until the host sets the complete data. |
| 20 | + |
| 21 | +## Dependencies |
| 22 | + |
| 23 | +- Peer: `@angular/common`, `@angular/core`, `@angular/material`, `@orcid/ui`, `rxjs` |
| 24 | +- The host app (orcid-angular) supplies `@orcid/ui` and design tokens (e.g. via `tokens.css`). |
| 25 | + |
| 26 | +## Building |
| 27 | + |
| 28 | +- From repo root: `ng build orcid-registry-ui` (or use the npm script if defined). |
| 29 | + |
| 30 | +## When changing this library’s API |
| 31 | + |
| 32 | +If you add or change **inputs**, **data types**, or **public behavior** in a registry-ui component, update **both** the main app usage (under `src/`) and the component’s doc page (usage snippet, inputs list, examples) so they stay in sync. |
| 33 | + |
| 34 | +## Docs site (`projects/orcid-ui-docs`) |
| 35 | + |
| 36 | +Registry-ui doc pages live under **`src/app/pages/orcid-registry-ui/`** (orcid-ui pages live under `pages/orcid-ui/`). When adding a new registry-ui component doc: |
| 37 | + |
| 38 | +- Add the page in `projects/orcid-ui-docs/src/app/pages/orcid-registry-ui/<name>-page.component.{ts,html,scss}` |
| 39 | +- Import `DocumentationPageComponent` from `'../../components/documentation-page/documentation-page.component'` |
| 40 | +- Register a lazy route in `app.routes.ts` pointing to `./pages/orcid-registry-ui/<name>-page.component` |
| 41 | +- Add a sidebar link under the “Orcid Registry UI” section in `docs-shell.component.html` |
0 commit comments