Fix: LAUNCH button blank canvas and shared circuit missing branch#22
Open
ImranFarhat01 wants to merge 1 commit into
Open
Fix: LAUNCH button blank canvas and shared circuit missing branch#22ImranFarhat01 wants to merge 1 commit into
ImranFarhat01 wants to merge 1 commit into
Conversation
…er (Bug 9, Bug 5)
Bug 9:
- LAUNCH button on saved circuits called fetchSchematic(sch.save_id)
with only one argument
- fetchSchematic builds the API URL as save/{id}/{version}/{branch},
so missing version/branch resulted in save/{id}/undefined/undefined
- Fix: pass sch.version and sch.branch (both present in the
SaveListSerializer response) to fetchSchematic
Bug 5:
- Loading a shared circuit URL with no branch query param resulted
in the same save/{id}/{version}/undefined API call failure,
causing a blank canvas
- Fix: default branch to 'master' when the branch query param is
absent
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.
Problem
1: Clicking LAUNCH on a saved circuit in the schematics list
loaded a blank canvas instead of the circuit.
2: Opening a shared circuit URL with no
branchqueryparameter also resulted in a blank canvas.
Root Cause
fetchSchematicbuilds the API request assave/{id}/{version}/{branch}.In both cases,
versionand/orbranchwereundefined, producing arequest like
save/{id}/undefined/undefined, which fails.Fix
sch.versionandsch.branch(bothalready present in the SaveListSerializer API response) to
fetchSchematicbranchto'master'when thebranchquery param isabsent from the URL
Testing
loads correctly on canvas
correctly instead of showing a blank canvas