Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add template export functionality to UI#18214

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
kylecarbs merged 3 commits intomainfromfeat/template-export-ui
Jun 3, 2025

Conversation

blink-so[bot]
Copy link
Contributor

@blink-soblink-sobot commentedJun 3, 2025

Summary

This PR adds template export functionality to the Coder UI, addressing issue#17859. Users can now export templates directly from the web interface without requiring CLI access.

Changes

Frontend API

  • AddeddownloadTemplateVersion function tosite/src/api/api.ts
  • Supports both TAR (default) and ZIP formats
  • Uses existing/api/v2/files/{fileId} endpoint with format parameter

UI Enhancement

  • Added "Export as TAR" and "Export as ZIP" options to template dropdown menu
  • Positioned logically between "Duplicate" and "Delete" actions
  • Uses download icon from Lucide React for consistency

User Experience

  • Files automatically named as{templateName}-{templateVersion}.{extension}
  • Immediate download trigger on click
  • Proper error handling with console logging
  • Clean blob URL management to prevent memory leaks

Testing

The implementation has been tested for:

  • ✅ TypeScript compilation
  • ✅ Proper function signatures and types
  • ✅ UI component integration
  • ✅ Error handling structure

Screenshots

The export options appear in the template dropdown menu:

  • Export as TAR (default format, compatible withcoder template pull)
  • Export as ZIP (compressed format for easier handling)

Fixes

Closes#17859

Notes

This enhancement makes template management more accessible for users who:

  • Don't have CLI access
  • Manage deployments on devices without Coder CLI
  • Prefer web-based workflows
  • Need to transfer templates between environments

The implementation follows existing patterns in the codebase and maintains consistency with the current UI design.

- Add downloadTemplateVersion function to frontend API- Add Export as TAR and Export as ZIP options to template dropdown menu- Implement file download with proper naming convention- Support both tar and zip formats as requested in issue#17859Fixes#17859
@github-actionsGitHub Actions
Copy link

github-actionsbot commentedJun 3, 2025
edited
Loading

All contributors have signed the CLA ✍️ ✅
Posted by theCLA Assistant Lite bot.

blink-sobotand others added2 commitsJune 3, 2025 17:49
Fix import ordering to comply with biome linting rules by movingAPI import to the correct position in the import order.
@github-actionsGitHub Actions
Copy link


🚀 Deploying PR 18214 ...

github-actions[bot] reacted with eyes emoji

@kylecarbs
Copy link
Member

image

This is what it looks like!

@BrunoQuaresma
Copy link
Collaborator

BrunoQuaresma commentedJun 3, 2025
edited
Loading

I would change the design just a bit.

  • Use the copy "Download tar" and "Download zip" instead of "Export as"
  • Add a divider to divide the download actions

But not a blocker.

@kylecarbs
Copy link
Member

I kinda like the way it is as-is. I'll test locally then merge if all is good.

BrunoQuaresma reacted with thumbs up emoji

@kylecarbskylecarbs merged commitcc89820 intomainJun 3, 2025
35 of 38 checks passed
@kylecarbskylecarbs deleted the feat/template-export-ui branchJune 3, 2025 18:26
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJun 3, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@BrunoQuaresmaBrunoQuaresmaBrunoQuaresma approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Allow exporting templates from UI
2 participants
@kylecarbs@BrunoQuaresma

[8]ページ先頭

©2009-2025 Movatter.jp