Import/export fix, Event info fields normalized, linting - #467
Conversation
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://blue-flower-0c36fd81e-467.westus2.5.azurestaticapps.net |
There was a problem hiding this comment.
Pull request overview
This PR aligns events with other glyphs by moving event name/description/display ID into the EventInfo model (instead of simulationData), fixes event layout round-tripping via the SBOL Layout extension (import/export), improves import/export error messaging, and applies TypeScript/Java linting and typing improvements across the mxGraph integration.
Changes:
- Normalize event metadata (displayID/name/description) and round-trip event layout through the Layout extension with tolerance for incomplete imports.
- Fix import failure messaging (“Import failed” vs “Export failed”) and improve mxGraph TS typings / type-only imports.
- Add/refresh tests for event round-trip behavior and apply formatting/lint cleanups.
Reviewed changes
Copilot reviewed 25 out of 30 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| SBOLCanvasFrontend/src/mxgraph.d.ts | Tighten mxGraph typings and add mxCell/mxEditor augmentations. |
| SBOLCanvasFrontend/src/mxgraph-module.d.ts | Add module declaration for mxgraph default export. |
| SBOLCanvasFrontend/src/app/style-info.ts | Switch mxgraph import style to match new typings. |
| SBOLCanvasFrontend/src/app/model-editor/model-editor.component.ts | Null-safe info handling and more robust parsing of interaction params. |
| SBOLCanvasFrontend/src/app/model-editor/model-editor.component.html | Remove event “Name” field from simulation parameter panel. |
| SBOLCanvasFrontend/src/app/interactionInfo.ts | Strongly type refinement maps and simulationData. |
| SBOLCanvasFrontend/src/app/info-editor/info-editor.component.ts | Add EventInfo editing support (displayID/name/description). |
| SBOLCanvasFrontend/src/app/info-editor/info-editor.component.html | Add Event info panel fields in the info editor UI. |
| SBOLCanvasFrontend/src/app/graph-edits.ts | Type-only mxGraph imports and minor TS fixes. |
| SBOLCanvasFrontend/src/app/graph-base.ts | Lint/format updates and various mxGraph prototype helpers. |
| SBOLCanvasFrontend/src/app/glyphInfo.ts | Type simulationData and minor constructor formatting. |
| SBOLCanvasFrontend/src/app/glyph-menu/glyph-palette.service.ts | Gate Event util tile visibility in component definition mode. |
| SBOLCanvasFrontend/src/app/eventInfo.ts | Add displayID/name/description generation & encoding for events. |
| SBOLCanvasFrontend/src/app/eventInfo.spec.ts | New unit tests for frontend EventInfo behavior. |
| SBOLCanvasFrontend/src/app/design-menu/design-menu.component.ts | Initialize StyleInfo to a safe default. |
| SBOLCanvasBackend/src/test/java/org/sbolcanvas/utils/SBOLToSBMLPipelineEventsTest.java | Formatting-only test readability tweaks. |
| SBOLCanvasBackend/src/test/java/org/sbolcanvas/utils/EventRoundTripTest.java | New backend round-trip + tolerance tests for events and layout. |
| SBOLCanvasBackend/src/test/java/org/sbolcanvas/utils/EventGenericTopLevelPreservationTest.java | Remove older event GTL preservation test (superseded). |
| SBOLCanvasBackend/src/test/java/org/sbolcanvas/utils/ConverterCodecTest.java | Update codec test expectations for event name/description fields. |
| SBOLCanvasBackend/src/main/java/org/sbolcanvas/utils/SBOLToMx.java | Import events via Layout extension; tolerate missing layout via staggered fallback. |
| SBOLCanvasBackend/src/main/java/org/sbolcanvas/utils/SBOLData.java | Remove event-name param constant and apply formatting updates. |
| SBOLCanvasBackend/src/main/java/org/sbolcanvas/utils/MxToSBOL.java | Export events per module view using Layout extension nodes. |
| SBOLCanvasBackend/src/main/java/org/sbolcanvas/utils/MxToSBML.java | Use EventInfo.name for SBML event IDs and map event cells by value for geometry. |
| SBOLCanvasBackend/src/main/java/org/sbolcanvas/utils/Converter.java | Add eventFilter; simplify eventDict loading via generalized loadDictionary. |
| SBOLCanvasBackend/src/main/java/org/sbolcanvas/servlets/Convert.java | Correct import vs export failure default messages. |
| SBOLCanvasBackend/src/main/java/org/sbolcanvas/data/EventInfo.java | Add name/description fields on backend EventInfo. |
| README.md | Whitespace/formatting cleanup and build/test notes. |
Suppressed comments (2)
SBOLCanvasFrontend/src/app/graph-base.ts:1397
- This validation message is missing a word: "isn't allowed target anything" should be "isn't allowed to target anything".
return 'Degradation isn\'t allowed target anything.';
SBOLCanvasFrontend/src/app/graph-base.ts:1402
- Typo/grammar in validation message: "Degredation" → "Degradation", and the phrase should read "only allowed from a molecular species".
return 'Degredation is only allowed molecular species as a source.';
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://blue-flower-0c36fd81e-467.westus2.5.azurestaticapps.net |
0d83dc3 to
2bf3ab3
Compare
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://blue-flower-0c36fd81e-467.westus2.5.azurestaticapps.net |
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://blue-flower-0c36fd81e-467.westus2.5.azurestaticapps.net |
|
Additions to the PR following the reviews:
|
Event names and descriptions where in the simulation data key, not on the event info like other glyphs, and exported events didn't keep consistent locations. Fixed to work like other glyphs and use the layout extension correctly.
Closes #456
Closes #431