Skip to content

Conversation

@csaenz-psg
Copy link
Collaborator

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.

Copy link
Contributor

@odungern odungern left a 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.

@odungern
Copy link
Contributor

odungern commented Nov 20, 2025

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.

@odungern odungern marked this pull request as ready for review November 27, 2025 10:54
Copilot AI review requested due to automatic review settings November 27, 2025 10:54
@odungern odungern merged commit 6599764 into dev Nov 27, 2025
6 checks passed
@odungern odungern deleted the 43-create-environment-to-select-a-file-for-import branch November 27, 2025 10:54
Copy link

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

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 .vue Single File Components
  • Reorganized plugin files into src/plugins/Imports/ and src/plugins/Exports/ directories
  • Added file input functionality to JSON Import component using v-file-input
  • Updated main.ts to 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?) {
Copy link

Copilot AI Nov 27, 2025

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.

Suggested change
install(app: App, options?) {
install(app: App) {

Copilot uses AI. Check for mistakes.
<template>
<v-btn color='primary' @click='dialog = true'>Import JSON</v-btn>
<v-dialog v-model='dialog'>
<v-card class=w-50>
Copy link

Copilot AI Nov 27, 2025

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.

Suggested change
<v-card class=w-50>
<v-card class="w-50">

Copilot uses AI. Check for mistakes.
<v-file-input
accept='.json'
label='JSON Input'
prepend-icon='mdi-folder_open'
Copy link

Copilot AI Nov 27, 2025

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.

Suggested change
prepend-icon='mdi-folder_open'
prepend-icon='mdi-folder-open'

Copilot uses AI. Check for mistakes.
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.

3 participants