-
Notifications
You must be signed in to change notification settings - Fork 10
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
Show code examples on usage site #90
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will be impossible to maintain. The user should not have to add their code as a string to a file. The code should be loaded automatically
hey @seveibar just to clarify, do you need only the main code, like this: import React from 'react'; const CircleExample = () => { export default () => ( return ( export default CircleExample; Could you let me know which approach you’d prefer?" |
@seveibar I have changed as you said to maintain a code and user should be able to easy to add, code is automatically loaded from Examples. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not acceptable to adapt JSX to convert it to code. Use a cosmos or vite plugin
@DevGajjar28 your solution looks similar to @anas-sarkez , you may want to have a quick chat on the discord. @anas-sarkez has been DM'ing me regarding his designs so I'm more inclined to accept his solution if you both PR at the same time. You both have the same issue where you're not actually loading source file content. |
#89
/claim #89
This PR adds a feature to the jscad-fiber usage site that allows users to view the code for each example.
I have created a user-friendly interface that is easy to use and understand. After reviewing the [Quickstart guide]
(https://docs.tscircuit.com/quickstart), I decided to adopt the same theme and organization to ensure better performance and consistency. Also I followed best practices for code quality, ensuring that it is easy to use, understand, reusable, and easily extendable for future additions.
Preview :
Uploading jscad-fiber - Google Chrome 2024-11-06 13-57-57.mp4…