Skip to content

add download button BEN-1075 #25

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

Merged
merged 1 commit into from
Jun 13, 2025
Merged

Conversation

juancastano
Copy link
Contributor

@juancastano juancastano commented Jun 13, 2025

TL;DR

Added a download button to the UI Builder that allows users to download generated UI projects as a ZIP file.

What changed?

  • Created a new DownloadButton component that packages all generated files into a downloadable ZIP archive
  • Integrated the download button into the PreviewCard component's header, next to the tabs
  • Added JSZip library to handle ZIP file creation and management
  • The button shows a loading state during the download process

How to test?

  1. Navigate to the UI Builder
  2. Generate a UI component
  3. Click the "Download Project" button in the header
  4. Verify that a ZIP file named "generated-ui-project.zip" is downloaded
  5. Extract the ZIP and confirm it contains all the generated files

Why make this change?

This feature enhances the user experience by providing an easy way to export and use the generated UI components in their own projects. Previously, users would need to manually copy each file, but now they can download the entire project structure with a single click.

Copy link
Contributor Author

juancastano commented Jun 13, 2025

Merge activity

  • Jun 13, 10:36 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jun 13, 10:41 PM UTC: Graphite rebased this pull request as part of a merge.
  • Jun 13, 10:43 PM UTC: @juancastano merged this pull request with Graphite.

@juancastano juancastano changed the base branch from 06-13-add_loading_state to graphite-base/25 June 13, 2025 22:39
@juancastano juancastano force-pushed the 06-13-add_download_button branch from 85761ca to a32e723 Compare June 13, 2025 22:40
@juancastano juancastano changed the base branch from graphite-base/25 to 06-13-add_loading_state June 13, 2025 22:40
@juancastano juancastano changed the base branch from 06-13-add_loading_state to main June 13, 2025 22:40
@juancastano juancastano mentioned this pull request Jun 13, 2025
@juancastano juancastano force-pushed the 06-13-add_download_button branch from a32e723 to 9242fb2 Compare June 13, 2025 22:41
@juancastano juancastano merged commit 1436d42 into main Jun 13, 2025
1 check passed
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

Successfully merging this pull request may close these issues.

1 participant