Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add session start/stop events #328

Merged
merged 3 commits into from
Feb 11, 2020
Merged

Add session start/stop events #328

merged 3 commits into from
Feb 11, 2020

Conversation

trestletech
Copy link
Contributor

@trestletech trestletech commented Feb 11, 2020

Adds session_start and session_stop events.

I originally hoped to install the session_start handler in initialize.R next to the stop handler. Unfortunately, we don't initialize_session_state (which is necessary to get the tutorial ID/name/etc) until we run a session$registerDataObj handler. I couldn't find a viable way to defer the session start logic until the handler had been run, so I went this route instead. (later::later didn't do it late enough).

Listening on http://127.0.0.1:6924
com.rstudio.primers.02-vis-basics (1): jeff
event: session_start
com.rstudio.primers.02-vis-basics (1): jeff
event: section_skipped
com.rstudio.primers.02-vis-basics (1): jeff
event: question_submission
com.rstudio.primers.02-vis-basics (1): jeff
event: session_stop

PR task list:

  • Update NEWS
  • NO - Add tests (if possible) -- deemed unfeasible?
  • N/A - Update documentation with devtools::document()

R/initialize.R Outdated Show resolved Hide resolved
@trestletech trestletech merged commit 3ad5a4d into master Feb 11, 2020
@trestletech trestletech deleted the jeff-events branch February 11, 2020 20:09
schloerke added a commit that referenced this pull request Feb 12, 2020
* master:
  implement tutorial_package_dependencies() (#329)
  Fix progressive reveal and Topics with special characters not loading (#330)
  Remove dead event, clarify Rmd/HTML docs (#331)
  Add session start/stop events (#328)
  Use `.on("load", fn)` as `.load(fn)` has been deprecated (#326)
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.

None yet

2 participants