[Portal] Add Storybook setup and component stories#5685
[Portal] Add Storybook setup and component stories#5685tung2744 merged 12 commits intoauthgear:mainfrom
Conversation
Initialize FluentUI icons in Storybook preview so v1 components render icons correctly. Add stories for TextFieldWithCopyButton under the components/v1 sidebar group, and document the v1/v2 Storybook convention under portal/docs/storybook.md. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Point agents at portal/docs/ (including portal/docs/storybook.md) so Portal-specific conventions are discoverable alongside docs/specs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…d documentation map Introduce Portal-specific developer docs under portal/docs/ describing the SPA architecture, frontend conventions (routing, GraphQL, styling, i18n, forms), and how they relate to the two GraphQL endpoints. Replace AGENTS.md "Read first" section with a "Documentation map" table so agents can find authoritative docs for each area at a glance. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Consolidate portal component usage guidelines into a dedicated docs folder so contributors can find naming, selection, input, feedback, and modal patterns in one place. Made-with: Cursor
TextArea, TextField, Button, Checkbox, Toggle
Foldable, ChoiceButton, DefaultButton, ActionButton
Tooltip, OutlineActionButton, PrimaryButton, TextFiled
IconRadioCards, LoginMethods, Dialog
Extract inline render bodies with hooks into named components to satisfy react-hooks/rules-of-hooks. Apply explicit boolean JSX values, consistent interface definitions, and drop unused eslint-disable directives and redundant conditional expressions.
|
I believe docs in portal/docs is not for human so lets put it in .agents? |
|
I think it's easier to manage if the harness rules/references live in their respective area folders. So component references would go in If that creates confusion with other spec documents, how about putting them into That said, for other docs/specs, I think they'll be read by both humans and AI agents (they should follow the same spec after all). So I'd lean towards keeping those documents in |
|
I see your point, but my concern is this added many docs to the repo which will likely become outdated after half year. It will be ok if they are expected to be managed and read only by agent. But if they are for human, I think it create confusion. So I think: |
|
I suggest the following changes to this PR:
|
|
Maybe I can just merge this and relocate the docs later, as they are not affecting the portal code. |
Summary
portal/.storybook/with component stories for buttons, inputs, dialogs, dropdowns, toggles, etc.portal/docs/components-guidelines/docs bundle and Portal ARCHITECTURE.md / FRONTEND.md.portal/docs.Test plan
cd portal && npm install && npm run storybook— verify dev server runs at http://localhost:6006npm run build-storybookbuilds without errors