Skip to content

Conversation

ds26gte
Copy link
Contributor

@ds26gte ds26gte commented Feb 10, 2025

No description provided.

jpolitz and others added 30 commits March 11, 2018 11:46
- app.json is only read when FIRST CREATED, future deploys do
  not read it
- All values must be strings
Intended for embedding use cases, the type is:

type InitialState = {
    editorContents: string,
    interactionsSinceLastRun: string
}

On load the editor will automatically run definitions with the given
text and then run all the given interactions.

Currently only enabled in embedding contexts.

Need state for two more cases:

- Editing definitions but haven't run at all yet
- Editing definitions after a run
One thing that's challenging is the use of on('change') on CodeMirror,
which triggers for calls to setValue().

In the events API, we change these to all use replaceRange with an
explicit `origin`. However, there are setValue() calls elsewhere in the
codebase. We could ignore these by checking the origin of "setValue",
but this could be a mistake if we do want to propagate around updates
like those. Need to think about this.

For now, filter out ones that come in before we are initialized, and
wait for the reset event to start sending things out. This makes sure
that the initialization of setting e.g. `use context current` doesn't
get sent out as an event.

Sometimes we get "empty" resets from VMT, and this commit just filters
those out. But it's not clear when exactly that happens.
- Don't propagate setvalue events; these are coming from page setup,
  but we want to wait for our 'reset'
- Don't setValue at all if the page is “controlled”. Add a new
  #-parameter #controlled=true that tells the page to not do its usual
  initialization and instead wait for the reset events
- The first 'reset' has a state of '', so deal with that appropriately
  to handle initialization in events.js
Trying to only run AWS stuff if PR (not sure what happens if it's a push to an existing PR, see https://stackoverflow.com/questions/66205887/only-run-github-actions-step-if-not-a-pull-request)
One more conditional-on-PR-step
@blerner
Copy link
Member

blerner commented Aug 24, 2025

I'm closing this PR as obsolete (and also much too big and conflicting to merge cleanly anymore). There appear to be three commits that were relevant:

  • ef460e3, which is ported to the vega library already,
  • a8e5ace and 72ed3e3, which have not...but which may or may not be needed, depending on what @schanzer thinks of the new UI

@blerner blerner closed this Aug 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants