quarto-dev / quarto-dev/quarto-cli

Clean plotly.py dependencies insertion to avoid duplicate in HTML output

Open
#12,882 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

engines-jupyter enhancement html plotly
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Following research in

by @gordonwoodhull and I

It appears that Plotly.py is inserting dependencies that we may not be needed in Quarto rendering.

  • plotly.js is inserted twice by plotly.py - see #12842 analysis.

  • Mathjax is inserting also by Plotly.py. We already insert Mathjax in HTML output when there is math in the document.
    Maybe we should clean the plotly.py insertion in this case to avoid conflict.

Opening this issue to find it back when we encounter problem, or we know what to do. It could also be some issues in plotly.py 6+ following change from using require.js to using module now.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the analysis in Quarto CLI pull request #12842 and inspect how Plotly.py dependencies enter Quarto HTML rendering. Confirm the duplicate plotly.js insertion and the interaction between Plotly.py's MathJax insertion and Quarto's MathJax output, including the possible Plotly.py 6+ module change. Done means the dependency behavior is understood and any duplicate or conflicting insertion is resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, plotly
Domain
web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.