Feat 175 export import generalization#181
Open
karimouf wants to merge 13 commits into
Open
Conversation
… upload functionality
dennis-zyska
requested changes
May 6, 2026
Collaborator
dennis-zyska
left a comment
There was a problem hiding this comment.
- I tried to generate a study template and to download everything, but I get a TypeError in the browser console ("Cannot read properties of null (reading 'key')")
- Please also have a look into the lint problems, you can see it here in GitHub in the "Changes" tab of the PR
| * This is the single source of truth for downloadObjectsAs and getSupportedExportFormats. | ||
| */ | ||
| const EXPORT_FORMATS = { | ||
| csv: { serialize: objectsToCSV, mimeType: "text/csv", label: "CSV Format", icon: "filetype-csv", description: "Comma-separated values, compatible with spreadsheets", extensions: [".csv"] }, |
Collaborator
There was a problem hiding this comment.
can we format that a bit better, such that it is more easy to read?
| }; | ||
| }, | ||
| methods: { | ||
| /** |
Collaborator
There was a problem hiding this comment.
This docstring looks really ugly
| : "Item"; | ||
| return [ | ||
| { title: "File Selection" }, | ||
| { title: `${itemLabel} Selection` }, |
Collaborator
There was a problem hiding this comment.
The itemLabel in the study import is study, which is why in the stepper in the frontend it looks like study Selection, but it would be better "Study Selection"
| }, | ||
| methods: { | ||
| /** | ||
| * Opens the import modal. |
Collaborator
There was a problem hiding this comment.
here the docstring as well, do we need all the examples etc.?
Collaborator
There was a problem hiding this comment.
What are the reasons for those removements?
| name="Create Template" | ||
| @click="createTemplate" | ||
| /> | ||
| <BasicButton |
Collaborator
There was a problem hiding this comment.
The buttons locations needs to improved, any idea?
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.
Export/Import Generalization
Refactored the export and import workflow into fully generic, reusable modal components (
ImportFormatModal,ExportFormatModal) and integrated them across all major template (not user data) dashboard entities, replacing per-component implementations.New User Features
New Dev Features
ImportFormatModal.open(table, childTable, { overrides, socket })— generic API for any table:table: table model for the imported datachildTable: child table(if exists) for child table model like study_steps to studies for exampleoverrides: force-merge fields into every imported record (e.g.{ template: true })socket.name: emit to a custom socket event instead ofappDataUpdatesocket.dataKey: nest item payload under a specific key, or spread flat if not usedsocket.extra: inject extra top-level fields into the socket payloadExportFormatModal.open(id, table, childTable, tableOptions, childTableOptions)— generic export API:id— primary key of the record to export; passnullto export all records currently loaded in the tabletable— Vuex table name to read parent records from (e.g."workflow","tag_set"); maps totable/{table}/getFilteredin the storechildTable— Vuex table name for records to nest inside each parent (e.g."workflow_step","tag"); children are matched via a foreign key auto-derived from the parent name (e.g."tag_set"→tagSetId); passnullwhen no nesting is neededtableOptions— reserved for future parent-table configuration; passnullfor nowchildTableOptions.key— overrides the property name used to nest the children array in the exported object (e.g."tags"instead of"tag"); defaults to the rawchildTablename when omittedImprovements
UploadModalis now documents-only (PDF) — configuration upload logic was removed and replaced byImportFormatModalKnown Limitations