Convert Angular plasmid directives to React components#15
Open
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
Open
Convert Angular plasmid directives to React components#15devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
Conversation
- Convert all 6 Angular directives to modern React functional components with hooks - Maintain identical SVG-based circular plasmid visualization functionality - Create complete React project structure with examples - Fix infinite re-render issues with proper useEffect dependencies - Include TypeScript support and comprehensive documentation - Test both pHS1 and pUC19 example visualizations successfully Components converted: - plasmid → Plasmid - plasmidtrack → PlasmidTrack - trackmarker → TrackMarker - trackscale → TrackScale - tracklabel → TrackLabel - markerlabel → MarkerLabel Co-Authored-By: Rehan Chawdry <rchawdry@atroposhealth.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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.
Convert Angular plasmid directives to React components
Summary
This PR converts the entire Angular plasmid visualization component library to modern React functional components with hooks. The conversion maintains 100% visual and functional compatibility while modernizing the codebase to use React 18+ patterns.
Key Changes:
plasmid→Plasmid,plasmidtrack→PlasmidTrack,trackmarker→TrackMarker,trackscale→TrackScale,tracklabel→TrackLabel,markerlabel→MarkerLabelSVGUtilservice to pure JavaScript utility functionsuseEffectdependency managementVisual Verification:
![React pHS1 Example]()
The React version produces identical circular plasmid visualizations with proper colors, positioning, labels, scales, and interactive markers.
Review & Testing Checklist for Human
🔴 HIGH PRIORITY - This conversion involves complex mathematical calculations and component interactions:
examples/biojs/to verify pixel-perfect renderingRecommended Test Plan:
npm startin thereact-plasmid/directoryDiagram
%%{ init : { "theme" : "default" }}%% graph TD subgraph "Original Angular" A1["src/js/directives.js<br/>(plasmid, plasmidtrack, etc.)"]:::major-edit A2["src/js/services.js<br/>(SVGUtil service)"]:::major-edit A3["examples/biojs/first.html"]:::context A4["examples/biojs/pUC19.html"]:::context end subgraph "New React Implementation" R1["react-plasmid/src/components/Plasmid.js"]:::major-edit R2["react-plasmid/src/components/PlasmidTrack.js"]:::major-edit R3["react-plasmid/src/components/TrackMarker.js"]:::major-edit R4["react-plasmid/src/components/TrackScale.js"]:::major-edit R5["react-plasmid/src/components/TrackLabel.js"]:::major-edit R6["react-plasmid/src/components/MarkerLabel.js"]:::major-edit R7["react-plasmid/src/utils/svgUtils.js"]:::major-edit R8["react-plasmid/src/examples/FirstExample.js"]:::major-edit R9["react-plasmid/package.json"]:::minor-edit end A1 -->|"Converted to"| R1 A1 -->|"Converted to"| R2 A1 -->|"Converted to"| R3 A1 -->|"Converted to"| R4 A1 -->|"Converted to"| R5 A1 -->|"Converted to"| R6 A2 -->|"Converted to"| R7 A3 -->|"Replicated as"| R8 subgraph Legend L1[Major Edit]:::major-edit L2[Minor Edit]:::minor-edit L3[Context/No Edit]:::context end classDef major-edit fill:#90EE90 classDef minor-edit fill:#87CEEB classDef context fill:#FFFFFFNotes
Link to Devin run: https://app.devin.ai/sessions/e4bd1896888c4e1a86041f06d2fc9e3a
Requested by: @rchawdry