Implement code export modal for collections#825
Closed
furelid wants to merge 1 commit into
Closed
Conversation
Added a modal for exporting collection code, including a button to trigger the modal and functionality to copy export options to the clipboard.
Collaborator
|
nice! checking this out now |
Collaborator
|
Thanks @furelid! Closing in favor of #831, which mirrors your commit (preserving authorship) onto an internal branch so CI could run without the fork-authorization gate, plus a small follow-up commit addressing some review items:
Appreciate the contribution! |
Collaborator
|
Superseded by #831 (mirrored + follow-up fixes). |
lane711
added a commit
that referenced
this pull request
May 9, 2026
* Implement code export modal for collections Added a modal for exporting collection code, including a button to trigger the modal and functionality to copy export options to the clipboard. * fix(admin): harden code-export modal review feedback - Render export button + modal only on edit (need a name to fetch) - Use currentColor on export icon (was invisible on light-mode button) - JSON-stringify the embedded collection name to avoid breaking the script on quotes - Escape display_name in the modal HTML - Prefer navigator.clipboard.writeText with execCommand fallback - Drop id from the exported snake→camel result so it satisfies CollectionConfig - encodeURIComponent the collection name in the fetch URL - Wrap script in IIFE to avoid leaking helpers to window Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --------- Co-authored-by: Johan Furelid <8422426+furelid@users.noreply.github.com> Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request adds an export feature to the collection admin form, enabling users to export the configuration of config-managed collections as JSON via a modal dialog. The main changes involve UI enhancements and the addition of client-side logic to fetch and display collection data for export.
Changes
code-export-modal) that displays the exported collection configuration as JSON, includes a copy-to-clipboard button, and provides user feedback when copying.Testing
Manually tested, small batch of frontend code only - shouldn't be a need but can take it on when I have more free time
I included a short video testing different dimensions, using linux with chromium
Unit Tests
E2E Tests
Screenshots/Videos
589252068-b6869dd1-f15a-4134-b5f5-3c97a2b96e20.webm
Checklist
Generated with Claude Code in Conductor