-
-
Notifications
You must be signed in to change notification settings - Fork 18
chore: add Storybook stories for remaining components #2855
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: tobiasdiez <[email protected]>
Co-authored-by: tobiasdiez <[email protected]>
|
detailpane: always closed landing page: features + footer + get involved: don't show anything maybe need to mock prisma state? |
…ponents Co-authored-by: tobiasdiez <[email protected]>
Fixed in commit 35a991e: DetailPane: Now shows the visual structure of the pane with a note that it requires Pinia store context to function properly. LandingPageFeatures: Added mock feature data to display actual content instead of being blank. LandingPageFooter: Replaced component usage with simplified footer layout showing the structure and links. LandingPageGetInvolved: Added mock maintainers data so the section displays properly with all three action cards (Contribute, Donate, Develop). |
|
@copilot Your latest change is not good at all. The stories should test the components. Try to mock pinia, but not the compontent. Is this helpful: https://pinia.vuejs.org/cookbook/testing.html? |
…d of recreating HTML Co-authored-by: tobiasdiez <[email protected]>
Fixed in commit d7852f1. All stories now test the actual components with proper mocking: DetailPane: Uses actual component with mocked Pinia store via LandingPageFeatures: Uses actual component with mocked LandingPageFooter: Uses actual component with mocked LandingPageGetInvolved: Uses actual component with mocked The stories no longer recreate the component HTML - they test the real components with properly mocked dependencies. |
🔗 Linked issue
Resolves the requirement to add Storybook stories for all remaining components in the
componentsdirectory.📚 Description
Adds stories for 11 components that lacked Storybook documentation, achieving 100% story coverage for the components directory.
Components with new stories:
DetailPane,NavBar,SideBarLandingPageDownload.client,LandingPageFeatures,LandingPageFooter,LandingPageGetInvolved,LandingPageMoreDocumentEditor,DocumentView,TTableStory patterns:
DocumentEditor)Mocking implementation:
DetailPane: Mocks Pinia store usingcreatePinia(),setActivePinia(), and direct state manipulation to test the actual component withisDetailsOpen = trueLandingPageFeatures: MocksqueryCollectionglobal function to return mock feature dataLandingPageFooter: MocksqueryCollectionto provide legal notices and privacy policy contentLandingPageGetInvolved: MocksuseFetchglobal function to return mock maintainers listDocumentView: Mock GraphQL fragment data for different document typesExample story structure:
All stories follow existing TypeScript patterns and repository conventions, testing the actual components with properly mocked dependencies (Pinia stores and async composables) to ensure components display meaningful content in Storybook.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.