-
Notifications
You must be signed in to change notification settings - Fork 640
chore: update plotly.js to v2.25.2 #2471
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
Merged
+173
−100
Merged
Changes from 45 commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
8421274
chore: upgrade plotly.js to v2.12.0
cpsievert a2f37a7
chore: upgrade plotly.js to v2.12.1
cpsievert fc0b036
chore: upgrade plotly.js to v2.13.0
cpsievert dcdd359
chore: upgrade plotly.js to v2.13.1
cpsievert d4c3715
chore: upgrade plotly.js to v2.13.2
cpsievert a7975a3
chore: upgrade plotly.js to v2.13.3
cpsievert 9d5fa8f
chore: upgrade plotly.js to v2.14.0
cpsievert 84f89c6
chore: upgrade plotly.js to v2.15.0
cpsievert beafd47
chore: upgrade plotly.js to v2.15.1
cpsievert 3351a33
chore: upgrade plotly.js to v2.16.0
cpsievert e7022b1
chore: upgrade plotly.js to v2.16.1
cpsievert 6e95dbf
chore: upgrade plotly.js to v2.16.2
cpsievert 6a56f88
chore: upgrade plotly.js to v2.16.3
cpsievert e071415
chore: upgrade plotly.js to v2.16.4
cpsievert e9b20d9
chore: upgrade plotly.js to v2.16.5
cpsievert 638f93b
chore: upgrade plotly.js to v2.17.0
cpsievert 8de56da
chore: upgrade plotly.js to v2.17.1
cpsievert 341b32d
chore: upgrade plotly.js to v2.18.0
cpsievert 2685343
chore: upgrade plotly.js to v2.18.1
cpsievert b20bdef
chore: upgrade plotly.js to v2.18.2
cpsievert 1cf9ccf
chore: upgrade plotly.js to v2.19.0
cpsievert cc960f8
chore: upgrade plotly.js to v2.19.1
cpsievert 3aabdbe
chore: upgrade plotly.js to v2.20.0
cpsievert e08bbc1
chore: upgrade plotly.js to v2.21.0
cpsievert 972f728
chore: upgrade plotly.js to v2.22.0
cpsievert a987c74
chore: upgrade plotly.js to v2.23.0
cpsievert 50b7db2
chore: upgrade plotly.js to v2.23.1
cpsievert 7369403
Upgrade plotly.js to v2.23.2
cpsievert 988b3c9
Upgrade plotly.js to v2.24.0
cpsievert 782f921
Upgrade plotly.js to v2.24.1
cpsievert 8f233e6
Upgrade plotly.js to v2.24.2
cpsievert 16a7eb5
Upgrade plotly.js to v2.24.3
cpsievert 51e6872
Upgrade plotly.js to v2.25.0
cpsievert 8d8c0be
Upgrade plotly.js to v2.25.1
cpsievert 76d5440
Upgrade plotly.js to v2.25.2
cpsievert aec6bde
Add TODO tracking file for plotly.js upgrade
cpsievert 8a9466c
Update TODO with regression investigation results
cpsievert f0ae020
Update .Rbuildignore to exclude upgrade files
cpsievert 8fa3218
Clean up upgrade tracking files and revert R version requirement
cpsievert f2a409a
Merge branch 'master' into chore/update-plotlyjs
cpsievert 11b0950
Restore upgrade tracking files to git
cpsievert 67955a9
Accept new snaps
cpsievert 743c01a
Update shinytest2 snapshots for plotly.js v2.25.2
cpsievert b37b91f
Document plotly.js v2.25.2 upgrade in NEWS
cpsievert 56d909f
Remove upgrade tracking files from git (keep locally)
cpsievert ee076f6
Apply suggestions from code review
cpsievert File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,3 +21,5 @@ README.Rmd | |
| abbvie.R | ||
| ^\.httr-oauth$ | ||
| ^\.github$ | ||
| ^\.venv$ | ||
| CLAUDE\.md | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,98 @@ | ||
| # CLAUDE.md | ||
|
|
||
| This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. | ||
|
|
||
| ## Project Overview | ||
|
|
||
| plotly is an R package for creating interactive web graphics via the plotly.js JavaScript library. It provides two main interfaces: | ||
| - `ggplotly()`: Converts ggplot2 objects to interactive plotly visualizations | ||
| - `plot_ly()`: Direct interface to plotly.js for specialized chart types | ||
|
|
||
| ## Common Commands | ||
|
|
||
| ### Running Tests | ||
| ```r | ||
| # Run all tests | ||
| devtools::test() | ||
|
|
||
| # Run visual tests (requires kaleido via reticulate) | ||
| Sys.setenv("VISUAL_TESTS" = "true") | ||
| devtools::test() | ||
|
|
||
| # Run a single test file | ||
| devtools::test(filter = "ggplot-bar") | ||
| ``` | ||
|
|
||
| ### Package Check | ||
| ```r | ||
| rcmdcheck::rcmdcheck() | ||
| ``` | ||
|
|
||
| ### Building Documentation | ||
| ```r | ||
| devtools::document() | ||
| ``` | ||
|
|
||
| ### Visual Testing via Docker | ||
| For consistent visual test results: | ||
| ```shell | ||
| docker run -v $(pwd):/home/plotly --privileged -p 3838:3838 cpsievert/plotly-orca | ||
| ``` | ||
| Access the validation Shiny app at http://0.0.0.0:3838 | ||
|
|
||
| CI-only visual test run: | ||
| ```shell | ||
| docker run -e VMODE="ci" -v $(pwd):/home/plotly --privileged cpsievert/plotly-orca | ||
| ``` | ||
|
|
||
| ## Architecture | ||
|
|
||
| ### ggplot2 to plotly Conversion Pipeline | ||
|
|
||
| The conversion from ggplot2 to plotly follows this flow: | ||
|
|
||
| 1. **`ggplotly()`** (`R/ggplotly.R`): Entry point that dispatches on input type | ||
| 2. **`gg2list()`** (`R/ggplotly.R`): Main conversion function that: | ||
| - Builds the ggplot object to extract computed data | ||
| - Processes each layer through `layers2traces()` | ||
| - Processes layout through `layers2layout()` | ||
| 3. **`layers2traces()`** (`R/layers2traces.R`): Converts ggplot2 geom layers to plotly trace objects | ||
| 4. **`layers2layout()`** (`R/layers2layout.R`): Converts ggplot2 theme/coordinate settings to plotly layout | ||
|
|
||
| ### Direct plotly Interface | ||
|
|
||
| 1. **`plot_ly()`** (`R/plotly.R`): Creates a plotly object with trace attributes | ||
| 2. **`add_trace()`** and `add_*()` functions (`R/add.R`): Add traces to existing plots | ||
| 3. **`layout()`** (`R/layout.R`): Modify plot layout | ||
| 4. **`plotly_build()`** (`R/plotly_build.R`): Evaluates lazy attributes and creates final JSON for plotly.js | ||
|
|
||
| ### Key Modules | ||
|
|
||
| - `R/shiny.R`: Shiny integration and event handling | ||
| - `R/subplots.R`: Combining multiple plots | ||
| - `R/highlight.R`: Linked brushing/crosstalk support | ||
| - `R/animate.R`: Animation support | ||
| - `R/kaleido.R`, `R/orca.R`: Static image export | ||
|
|
||
| ## Testing Patterns | ||
|
|
||
| Tests should check the return value of `plotly_build()`: | ||
| ```r | ||
| test_that("example test", { | ||
| p <- plot_ly(x = 1:10, y = 1:10) | ||
| built <- plotly_build(p) | ||
| expect_equal(built$x$data[[1]]$x, 1:10) | ||
| }) | ||
| ``` | ||
|
|
||
| Visual tests use `expect_doppelganger()` from `tests/testthat/helper-vdiffr.R`: | ||
| ```r | ||
| test_that("visual test", { | ||
| p <- plot_ly(x = 1:10, y = 1:10) | ||
| expect_doppelganger(p, "scatter-basic") | ||
| }) | ||
| ``` | ||
|
|
||
| ## Code Style | ||
|
|
||
| Follow the tidyverse style guide: http://style.tidyverse.org/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.