[Sistent] Add Card component to the sistent components page#7582
[Sistent] Add Card component to the sistent components page#7582abhay1999 wants to merge 7 commits intolayer5io:masterfrom
Conversation
|
🚀 Preview for commit 4748878 at: https://69cf6c7405c70d5f108130dc--layer5.netlify.app |
rishiraj38
left a comment
There was a problem hiding this comment.
Add them to the this file for navigation.
Adds the three navigation entries for the Card component (overview, guidance, code) to content.js, addressing the review feedback on layer5io#7582. Signed-off-by: Abhay Chaurasiya <abhaychaurasiya19@gmail.com> Signed-off-by: abhay1999 <abhaychaurasiya19@gmail.com>
abhay1999
left a comment
There was a problem hiding this comment.
Hey @rishiraj38, added the Card entries to content.js — overview, guidance, and code links are all in there now, placed alphabetically between Box and Button. Let me know if anything else needs fixing!
|
🚀 Preview for commit 2281c7f at: https://69cfc62ce4c16a61ffaa7a35--layer5.netlify.app |
rishiraj38
left a comment
There was a problem hiding this comment.
No! Please place it above the chip component, not in the correct navigation location.
|
@abhay1999 Please address @rishiraj38 suggestion. |
| { id: 31, link: "/projects/sistent/components/card", text: "Card" }, | ||
| { id: 32, link: "/projects/sistent/components/card/guidance", text: "Card" }, | ||
| { id: 33, link: "/projects/sistent/components/card/code", text: "Card" }, |
cfb3e3e to
76e5cd0
Compare
Adds the three-file MDX documentation structure for the Card component under src/collections/sistent/components/card/, following the same pattern used by existing components like Button and Paper. - index.mdx: overview of card types (elevated, outlined), elevation levels, interactivity, and corner options - guidance.mdx: when to use cards, content structure best practices, hierarchy guidance, interactivity rules, and accessibility notes - code.mdx: runnable examples for basic card, outlined variant, elevation, square corners, clickable card, and card with header and actions Fixes layer5io#7543 Signed-off-by: Abhay Chaurasiya <abhaychaurasiya19@gmail.com> Signed-off-by: abhay1999 <abhaychaurasiya19@gmail.com>
The Card component was being used in the MDX examples without being imported, causing the Gatsby build to fail with "Expected component Card to be defined". Added the import from @sistent/sistent to all three files. Signed-off-by: Abhay Chaurasiya <abhaychaurasiya19@gmail.com> Signed-off-by: abhay1999 <abhaychaurasiya19@gmail.com>
Adds the three navigation entries for the Card component (overview, guidance, code) to content.js, addressing the review feedback on layer5io#7582. Signed-off-by: Abhay Chaurasiya <abhaychaurasiya19@gmail.com> Signed-off-by: abhay1999 <abhaychaurasiya19@gmail.com>
f91c263 to
123f6e0
Compare
Rajesh-Nagarajan-11
left a comment
There was a problem hiding this comment.
What? We’re still using static URLs, @rishiraj38? The main goal of the MDX migration is to eliminate static URLs.
Signed-off-by: abhay1999 <abhaychaurasiya19@gmail.com>
123f6e0 to
1158ca1
Compare
|
This is my mistake i missed to review your PR carefully, disappointing @rishiraj38 😕 |
|
Nice addition, @abhay1999. The three-file MDX structure (overview / guidance / code) following the same pattern as Button and Paper is exactly right, and the code examples using One coordination note: #7587 is simultaneously refactoring the Sistent pagination to remove Once that coordination is sorted and the changes-requested items from the earlier review cycle are confirmed resolved, this is ready to go. |
|
Thanks @arjunmehta-git for the detailed review! Regarding the coordination with #7587 — I checked the PR and the Card MDX files should work fine with the new dynamic GraphQL routing. The So either way works:
Happy to remove the |
Description
This PR adds the MDX documentation pages for the
Cardcomponent to the Sistent components section of layer5.io, closing #7543.The Card component is already part of the Sistent library (source) and is actively used across Meshery (e.g. user preferences page). These docs give it the same treatment as other components like Button and Paper.
Changes
Three files added under
src/collections/sistent/components/card/:index.mdx— Component overview: types (elevated vs outlined), elevation levels, interactivity, and corner options with live examplesguidance.mdx— When to use cards, content structure best practices, visual hierarchy guidance, interactivity rules, and accessibility notescode.mdx— Runnable code examples: basic card, outlined variant, elevation, square corners, clickable card, and a card with header + action buttonsThe structure and formatting follows the existing pattern used by Button and Paper.
Checklist
name,title,published,component, anddescriptionThemeWrapperandCodeBlockas in other componentsSigned-off-by: Abhay Chaurasiya abhaychaurasiya19@gmail.com