Skip to content
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

Add Library Installation Recommendations in Generated UI Code #17

Open
Mefisto04 opened this issue Oct 17, 2024 · 5 comments
Open

Add Library Installation Recommendations in Generated UI Code #17

Mefisto04 opened this issue Oct 17, 2024 · 5 comments
Assignees

Comments

@Mefisto04
Copy link
Contributor

This issue addresses the lack of library installation recommendations in the generated UI code. While the code provides useful snippets, it does not indicate the necessary libraries to install for proper functionality. Implementing this feature will significantly enhance user experience by guiding users on required dependencies.

Attached Screenshot:
image

please assign me this issue so that i can start work on it.

@ahaapple
Copy link
Contributor

@Mefisto04 Hi, thanks for your suggestion. How do you plan to fix this problem?

The dependencies in the code are here:
https://github.com/memfreeme/memfree/blob/main/frontend/components/code/evaluate-component.tsx

My previous plan was to provide a public github template repository, and then users can copy the code generated by memfree directly into a file and use it online. Like this one:
https://github.com/Yuyz0112/dewhale/tree/main/preview-ui

Because memfree supports ShadcnUI, ShadcnUI has a large number of components, and just telling users about the dependencies is not enough.

And tailwind also needs some configuration: https://github.com/memfreeme/memfree/blob/main/frontend/components/code/iframe-renderer.ts

I think we can add a preview top-level directory to the memfree repository, configure package.json, tailwind.config.js, and ShadcnUI components.

Do you have any good ideas and suggestions? Thanks

@Mefisto04
Copy link
Contributor Author

Exactly as your response uses different library and component so to give package installation command at top which is used in that response will be helpful for user.

@ahaapple
Copy link
Contributor

Hi, The key point is that all components or pages generated by memfree have the same dependencies, so we don't need to remind users every time we reply. We only need to tell them once in one place. A public github repository template should be the simplest. Do you have a better idea?

@Mefisto04
Copy link
Contributor Author

fare points, but if some user generate a template with the shadcn component like button,cards so it have to add the button and cards separately by installing like npx shadcn@latest add button and for cards as well

@ahaapple
Copy link
Contributor

No, in this template project, we will define all the dependencies that may be needed, and all the Shadcn UI components will be included in it.

As long as it is the code generated by memfree. the user only need to follow the following steps to use it:


1. git clone

2. bun i

3. copy the code generated by memfree

3. bun dev

In the future, we will also consider supporting one-click deployment of UI pages to vercel or cloudflare page, which also requires a github repository template

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants