Skip to content

Import/export fix, Event info fields normalized, linting - #467

Merged
travisformayor merged 13 commits into
finalfrom
pr/events-fix
Sep 1, 2026
Merged

Import/export fix, Event info fields normalized, linting#467
travisformayor merged 13 commits into
finalfrom
pr/events-fix

Conversation

@travisformayor

Copy link
Copy Markdown
Contributor

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

@github-actions

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://blue-flower-0c36fd81e-467.westus2.5.azurestaticapps.net

Copilot AI left a comment

Copy link
Copy Markdown

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 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.

Comment thread SBOLCanvasFrontend/src/app/glyphInfo.ts Outdated
Comment thread SBOLCanvasFrontend/src/app/info-editor/info-editor.component.html Outdated
Comment thread SBOLCanvasBackend/src/main/java/org/sbolcanvas/utils/MxToSBOL.java Outdated
Comment thread SBOLCanvasFrontend/src/app/graph-base.ts Outdated
@github-actions

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://blue-flower-0c36fd81e-467.westus2.5.azurestaticapps.net

@github-actions

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://blue-flower-0c36fd81e-467.westus2.5.azurestaticapps.net

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 30 out of 35 changed files in this pull request and generated 2 comments.

Comment thread SBOLCanvasBackend/src/main/java/org/sbolcanvas/utils/MxToSBML.java Outdated
Comment thread SBOLCanvasFrontend/src/app/info.ts
@github-actions

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://blue-flower-0c36fd81e-467.westus2.5.azurestaticapps.net

@travisformayor

Copy link
Copy Markdown
Contributor Author

Additions to the PR following the reviews:

  • Rename events inline on the canvas like other glyphs
  • Export event names to SBML and add SBOL URI as an annotation
  • Make SBML ids safe for iBioSim (no double underscores) and unify id sanitization in Identifiers
  • Event target species stores the part's URI
  • Unify id generation and label/URI rules across the info classes

@travisformayor
travisformayor requested a lite review from Copilot August 30, 2026 19:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@travisformayor
travisformayor requested a review from cjmyers August 30, 2026 19:28
@travisformayor
travisformayor marked this pull request as ready for review August 30, 2026 19:28
@travisformayor
travisformayor merged commit e559e19 into final Sep 1, 2026
6 checks passed
@travisformayor
travisformayor deleted the pr/events-fix branch September 1, 2026 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants