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

First cut at unifying notebook renderers apis #123738

Merged
merged 3 commits into from
May 19, 2021

Conversation

mjbvz
Copy link
Collaborator

@mjbvz mjbvz commented May 13, 2021

This implements the api described in #123540. Major points:

  • Instead of having the markdown-it renderer pull it its dependencies (such as katex), now the dependencies can call getRenderer to import the object returned by the markdown-it renderer

  • We try to detect if a renderer is using the old or new api. Old renderers are still run as globals while new ones are loaded with import

  • I have only hooked up the new API for markdown renderers so far

This implements the api described in #123540. Major points:

- Instead of having the `markdown-it` renderer pull it its dependencies, instead the dependencies can call `getRenderer` to import the object returned by the `markdown-it` renderer

- We try to detect if a renderer is using the old or new api. Old renderers are still run as globals while new ones are loaded with `import`

- I have only hooked up the new API for markdown renderers so far
@connor4312 connor4312 changed the base branch from main to notebook/dev May 18, 2021 19:54
- Fix mis-used dependencies. Add the roughly proposed 'extends' model
  for notebook renderers. Keep it out of contribution schema for now
	until we can work it more.
- Made new loading work with JS modules.
- Consolidated the 'old style' code in the renderer so that we can just
  delete it when the time comes.
- Removed duplicated code and sharp edges from the 'queue' mechaism.
@connor4312 connor4312 merged commit b02acf3 into notebook/dev May 19, 2021
@connor4312 connor4312 deleted the dev/mjbvz/unify-renderers-api branch May 19, 2021 15:52
@github-actions github-actions bot locked and limited conversation to collaborators Jul 3, 2021
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.

3 participants