-
Notifications
You must be signed in to change notification settings - Fork 0
updating structure of plugins, adding file reading capability #48
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
updating structure of plugins, adding file reading capability #48
Conversation
odungern
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Let's try it.
We still need to align the naming of the plugins, see https://github.com/GfSE/CASCaDE-Reference-Implementation/tree/25-Transform-ReqIF-to-PIG/src/plugins.
O.
|
I thought I would/could align the names as discussed ... but this was just a draft pull request and so the merge hasn't been done yet. So I shouldn't fiddle around in your branch. If you initiate a real pull-request, Chris, I would sort out the renaming ... O. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the plugin architecture by migrating from inline template strings to separate Vue Single File Components (SFCs), and reorganizes the plugin structure into Imports/ and Exports/ subdirectories. The refactoring improves maintainability and adds file reading functionality to the JSON import component.
Key Changes:
- Migrated three plugins (JSON Import, JSON Export, RDF Export) from inline templates to
.vueSingle File Components - Reorganized plugin files into
src/plugins/Imports/andsrc/plugins/Exports/directories - Added file input functionality to JSON Import component using
v-file-input - Updated
main.tsto recursively load plugins from subdirectories
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/plugins/json-import-plugin.ts |
Removed old inline template version |
src/plugins/json-export-plugin.ts |
Removed old inline template version |
src/plugins/rdf-export-plugin.ts |
Removed old inline template version |
src/plugins/Imports/json-import-plugin.ts |
New plugin registration file importing separate Vue component |
src/plugins/Imports/JsonImportPlugin.vue |
New SFC with file reading capability via v-file-input |
src/plugins/Exports/json-export-plugin.ts |
New plugin registration file importing separate Vue component |
src/plugins/Exports/JsonExportPlugin.vue |
New SFC for JSON export dialog |
src/plugins/Exports/rdf-export-plugin.ts |
New plugin registration file importing separate Vue component |
src/plugins/Exports/RdfExportPlugin.vue |
New SFC for RDF export dialog |
src/main.ts |
Updated require.context to recursively load plugins from subdirectories |
components.d.ts |
Removed unused HelloWorld component declaration |
Comments suppressed due to low confidence (1)
src/main.ts:14
- Avoid automated semicolon insertion (91% of all statements in the enclosing script have an explicit semicolon).
})
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import RdfExportComponent from "./RdfExportPlugin.vue" | ||
|
|
||
| const rdfExportPlugin: Plugin = { | ||
| install(app: App, options?) { |
Copilot
AI
Nov 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The options parameter is declared but never used. It should be removed for consistency with json-export-plugin.ts, which has the same plugin structure but correctly omits the unused parameter.
| install(app: App, options?) { | |
| install(app: App) { |
| <template> | ||
| <v-btn color='primary' @click='dialog = true'>Import JSON</v-btn> | ||
| <v-dialog v-model='dialog'> | ||
| <v-card class=w-50> |
Copilot
AI
Nov 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing quotes around the class attribute value. The attribute should be class="w-50" instead of class=w-50. This will cause a syntax error in Vue templates.
| <v-card class=w-50> | |
| <v-card class="w-50"> |
| <v-file-input | ||
| accept='.json' | ||
| label='JSON Input' | ||
| prepend-icon='mdi-folder_open' |
Copilot
AI
Nov 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Material Design icon name should use hyphens, not underscores. Change mdi-folder_open to mdi-folder-open.
| prepend-icon='mdi-folder_open' | |
| prepend-icon='mdi-folder-open' |
Closes #43. Reworked plugin structure to have separate component file located in adjacent Vue file. Included file read component on import component as proof of concept.