Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Track switching the examples in the provenance graph #8

Closed
wants to merge 1 commit into from

Conversation

thinkh
Copy link
Member

@thinkh thinkh commented Mar 20, 2018

Closes #5

@sgratzl I tried to track the loaded example specifications as well. I encounter some bugs that I do not know how to fix it. Could you please have a look and fix it and/or explain it?

Bug 1: Always adding new dataset on reload

vega_clue_always-adding-new-dataset

  1. Load a new provenance graph
  2. Do something
  3. Reload the page creates a new branch

Expected: Run to the end of the first branch

Bug 2: Longer chains are not replayed

vega_clue-replay-error

image

cmds.ts:12 Uncaught (in promise) TypeError: Cannot read property 'setStateImpl' of undefined
    at ActionNode.<anonymous> (cmds.ts:12)
    at Generator.next (<anonymous>)
    at fulfilled (tslib.es6.js:62)

tslib.es6.js:63 Uncaught (in promise) TypeError: Cannot read property 'setStateImpl' of undefined
    at ActionNode.<anonymous> (cmds.ts:12)
    at Generator.next (<anonymous>)
    at fulfilled (tslib.es6.js:62)

@thinkh thinkh requested a review from sgratzl March 20, 2018 12:36
private switchVegaSpec(spec: Spec, title: string) {
const bak = this.currentSpec;
this.currentSpec = spec;
this.graph
Copy link
Contributor

Choose a reason for hiding this comment

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

if you execute the function anyhow, there is no need for "pushWithResult" but just a regular "push"

}

export function specCompressor(path: ActionNode[]) {
return lastOnly(path, CMD_SET_SPEC, (n) => n.requires[0].hash);
Copy link
Contributor

Choose a reason for hiding this comment

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

actually since the two actions are dependent on each other you need a more sophisticated compressor.

@thinkh
Copy link
Member Author

thinkh commented Mar 27, 2018

I will close this PR for now, since we decided to use the Gapminder example only. I might come back to this later.

@thinkh thinkh closed this Mar 27, 2018
@thinkh thinkh deleted the track-switch-example branch March 27, 2018 10:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Capture switch example in the provenance graph
2 participants