Skip to content

Reorganize the download menu and expose multi-format image exports on package pages#3073

Merged
rushabhcodes merged 2 commits intotscircuit:mainfrom
rushabhcodes:codex/offer-multiple-image-formats
Mar 29, 2026
Merged

Reorganize the download menu and expose multi-format image exports on package pages#3073
rushabhcodes merged 2 commits intotscircuit:mainfrom
rushabhcodes:codex/offer-multiple-image-formats

Conversation

@rushabhcodes
Copy link
Copy Markdown
Contributor

@rushabhcodes rushabhcodes commented Mar 29, 2026

What changed

This PR improves the shared download experience by restructuring DownloadButtonAndMenu and enabling richer image export options on package pages.

Changes included:

  • grouped download actions into clearer submenus for Images, 3D Models, and KiCad
  • extracted shared helpers for image downloads, 3D model downloads, and format badges to simplify the menu logic
  • preserved the existing single-image fallback when offerMultipleImageFormats is disabled
  • enabled offerMultipleImageFormats on the package page header so package viewers can choose:
    • Schematic PNG
    • PCB PNG
    • Assembly PNG
    • 3D PNG
  • grouped GLB, GLTF, and STEP exports under a dedicated 3D Models section

Why

Before this change, the package page only exposed a generic PNG download action even though the shared download menu already had support for multiple image representations. The overall menu was also flatter and harder to scan as more export formats accumulated.

This update makes the download UX more consistent, more discoverable, and easier to navigate across surfaces that use the shared menu.

User impact

Users viewing a package can now directly choose the exact image export they want instead of relying on a single generic PNG action.

The broader download menu is also easier to understand because related export types are now grouped together:

  • image exports are grouped under Images
  • 3D exports are grouped under 3D Models
  • KiCad exports are grouped under KiCad

Validation

Verified against the branch diff with main that this PR:

  • updates the shared DownloadButtonAndMenu component
  • keeps default image-download behavior when multi-format mode is off
  • enables multi-format image downloads from the package page header
  • adds the reorganized grouped download structure for image, 3D, and KiCad exports

Before

image

After

image

Copilot AI review requested due to automatic review settings March 29, 2026 15:34
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enables the View Package page header’s download menu to offer multiple PNG image format options (schematic/PCB/assembly/3D) by turning on the existing offerMultipleImageFormats behavior in DownloadButtonAndMenu.

Changes:

  • Passes offerMultipleImageFormats to DownloadButtonAndMenu in the package view header.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

@seveibar seveibar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's put all the images into a submenu in that dropdown, this is a bit out of hand. Same with 3D Models or any grouped category

@rushabhcodes rushabhcodes requested a review from seveibar March 29, 2026 16:14
@rushabhcodes
Copy link
Copy Markdown
Contributor Author

@seveibar
image

@rushabhcodes rushabhcodes changed the title feat: add support for offering multiple image formats in DownloadButtonAndMenu Reorganize the download menu and expose multi-format image exports on package pages Mar 29, 2026
@rushabhcodes rushabhcodes merged commit a4c2a82 into tscircuit:main Mar 29, 2026
5 checks passed
@tscircuitbot
Copy link
Copy Markdown
Contributor


Thank you for your contribution! 🎉

PR Rating: ⭐⭐⭐
Impact: Major

Track your contributions and see the leaderboard at: tscircuit Contribution Tracker


@rushabhcodes rushabhcodes deleted the codex/offer-multiple-image-formats branch March 29, 2026 18:29
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.

4 participants