Skip to content

Upgrade to plotly.js v1.54.1 #1771

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
merged 6 commits into from
May 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# 4.9.2.9000

## Changes to plotly.js

* This version of the R package upgrades the version of the underlying plotly.js library from v1.52.2 to v1.54.1. This includes many bug fixes and improvements. The [plotly.js release page](https://github.com/plotly/plotly.js/releases) has the full list of changes.

## IMPROVEMENTS

## BUG FIXES
Expand Down
2 changes: 1 addition & 1 deletion R/plotly.R
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ typedArrayPolyfill <- function() {
plotlyMainBundle <- function() {
htmltools::htmlDependency(
name = "plotly-main",
version = "1.52.2",
version = "1.54.1",
package = "plotly",
src = dependency_dir("plotlyjs"),
script = "plotly-latest.min.js",
Expand Down
Binary file modified R/sysdata.rda
Binary file not shown.
69 changes: 32 additions & 37 deletions inst/docker/Dockerfile.vtest
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,18 @@
# $ docker run -e VMODE="ci" -v $(pwd):/home/plotly --privileged -p 3838:3838 cpsievert/plotly-vtest
# ------------------------------------------------------------------------------

FROM ubuntu:16.04
FROM ubuntu:xenial
MAINTAINER Carson Sievert "carson@rstudio.com"

# Don't print "debconf: unable to initialize frontend: Dialog" messages
ARG DEBIAN_FRONTED=noninteractive
ARG CACHEBUST=1

# Need this to add R repo
RUN apt-get update && apt-get install -y software-properties-common

# Add R apt repository
RUN add-apt-repository "deb http://cran.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran35/"
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0x51716619e084dab9

# Install basic stuff and R
RUN apt-get update && apt-get install -y \
RUN apt-get update && apt-get install -y software-properties-common apt-transport-https \
&& add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu xenial-cran35/" \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 \
&& apt-get update && apt-get install -y \
sudo \
git \
vim-tiny \
Expand All @@ -33,11 +29,12 @@ RUN apt-get update && apt-get install -y \
libcairo2-dev \
libxt-dev \
libssl-dev \
libxml2-dev
libxml2-dev \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \
&& locale-gen en_US.utf8 \
&& /usr/sbin/update-locale LANG=en_US.UTF-8

RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \
&& locale-gen en_US.utf8 \
&& /usr/sbin/update-locale LANG=en_US.UTF-8
ENV LANG=en_US.UTF-8

# Rprofile
Expand All @@ -48,30 +45,27 @@ RUN echo 'options(\n\
shiny.host = "0.0.0.0", shiny.port = 3838\n\
)' >> /etc/R/Rprofile.site

# Update R packages
RUN R -e "update.packages(ask = F)"

# Other R packages needed for running visual tests
RUN R -e "install.packages('devtools')"
RUN R -e "install.packages('roxygen2')"
RUN R -e "install.packages('testthat')"
RUN R -e "install.packages('vdiffr')"
RUN R -e "install.packages('diffobj')"
# Update R packages and install those needed for visual testing
RUN R -e "update.packages(ask = F); invisible(lapply(list('devtools', 'roxygen2', 'testthat', 'vdiffr', 'diffobj'), install.packages, dependencies=TRUE, repos='http://cloud.r-project.org/'))"

# sf system dependencies
RUN add-apt-repository ppa:ubuntugis/ubuntugis-unstable --yes
RUN apt-get -y update
RUN apt-get install -y libudunits2-dev libproj-dev libgeos-dev libgdal-dev
RUN add-apt-repository ppa:ubuntugis/ubuntugis-unstable --yes \
&& apt-get -y update \
&& apt-get install -y libudunits2-dev libproj-dev libgeos-dev libgdal-dev

# Install all plotly's dependencies
RUN R -e "install.packages('plotly', dependencies = T)"

# system dependencies related to running orca
RUN apt-get install -y \
libgtk2.0-0 \
libgtk2.0-0 \
libgconf-2-4 \
xvfb \
fuse \
xauth \
libxtst6 \
libxss1 \
libnss3 \
libasound2 \
desktop-file-utils

# google chrome
Expand All @@ -81,28 +75,29 @@ RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key
apt-get install -y google-chrome-stable

# Download orca binary and make it executable under xvfb
RUN wget https://github.com/plotly/orca/releases/download/v1.1.1/orca-1.1.1-x86_64.AppImage -P /home
RUN chmod 777 /home/orca-1.1.1-x86_64.AppImage
RUN printf '#!/bin/bash \nxvfb-run --auto-servernum --server-args "-screen 0 640x480x24" /home/orca-1.1.1-x86_64.AppImage "$@"' > /usr/bin/orca
RUN chmod 777 /usr/bin/orca
RUN mkdir -p /opt/orca \
&& cd /opt/orca \
&& wget https://github.com/plotly/orca/releases/download/v1.3.1/orca-1.3.1.AppImage \
&& chmod +x orca-1.3.1.AppImage \
&& ./orca-1.3.1.AppImage --appimage-extract \
&& rm orca-1.3.1.AppImage \
&& printf '#!/bin/bash \nargs=("$@") \nif [[ ! " ${args[@]} " =~ "--no-sandbox" ]]; then \n args+=("--no-sandbox") \nfi \nxvfb-run --auto-servernum --server-args "-screen 0 640x480x24" /opt/orca/squashfs-root/orca "${args[@]}"' > /usr/bin/orca \
&& chmod +x /usr/bin/orca

# switch on visual testing
ENV VDIFFR=true
EXPOSE 3838

RUN R -e "install.packages('assertthat')"
RUN R -e "install.packages('testthat')"
ARG CRANCACHE=1

RUN R -e "update.packages(ask=FALSE)"
RUN R -e "remotes::install_github('r-lib/vdiffr')"
RUN R -e "install.packages('rnaturalearth')"

# install any new dependencies, then either manage cases (the default) or run tests
# note the workaround to get docker to run a proper exit status when there are testthat errors
# https://github.com/r-lib/testthat/issues/515#issuecomment-304169376
CMD R -e "remotes::install_deps(dep = TRUE)"

CMD cd /home/plotly && R -e "devtools::install_deps(dep = T); \
if (!identical(Sys.getenv('VMODE'), 'ci')) vdiffr::manage_cases(); \
CMD cd /home/plotly; R -e "if (!identical(Sys.getenv('VMODE'), 'ci')) vdiffr::manage_cases(); \
res <- devtools::test(reporter='summary'); \
df <- as.data.frame(res); \
if (sum(df\$failed) > 0 || any(df\$error)) q(status=1)"
8 changes: 4 additions & 4 deletions inst/examples/shiny/event_data/tests/mytest-expected/001.json
Original file line number Diff line number Diff line change
Expand Up @@ -439,9 +439,9 @@
},
{
"name": "plotly-htmlwidgets-css",
"version": "1.52.2",
"version": "1.54.1",
"src": {
"href": "plotly-htmlwidgets-css-1.52.2"
"href": "plotly-htmlwidgets-css-1.54.1"
},
"meta": null,
"script": null,
Expand All @@ -452,9 +452,9 @@
},
{
"name": "plotly-main",
"version": "1.52.2",
"version": "1.54.1",
"src": {
"href": "plotly-main-1.52.2"
"href": "plotly-main-1.54.1"
},
"meta": null,
"script": "plotly-latest.min.js",
Expand Down
8 changes: 4 additions & 4 deletions inst/examples/shiny/event_data/tests/mytest-expected/002.json
Original file line number Diff line number Diff line change
Expand Up @@ -456,9 +456,9 @@
},
{
"name": "plotly-htmlwidgets-css",
"version": "1.52.2",
"version": "1.54.1",
"src": {
"href": "plotly-htmlwidgets-css-1.52.2"
"href": "plotly-htmlwidgets-css-1.54.1"
},
"meta": null,
"script": null,
Expand All @@ -469,9 +469,9 @@
},
{
"name": "plotly-main",
"version": "1.52.2",
"version": "1.54.1",
"src": {
"href": "plotly-main-1.52.2"
"href": "plotly-main-1.54.1"
},
"meta": null,
"script": "plotly-latest.min.js",
Expand Down
8 changes: 4 additions & 4 deletions inst/examples/shiny/event_data/tests/mytest-expected/003.json
Original file line number Diff line number Diff line change
Expand Up @@ -460,9 +460,9 @@
},
{
"name": "plotly-htmlwidgets-css",
"version": "1.52.2",
"version": "1.54.1",
"src": {
"href": "plotly-htmlwidgets-css-1.52.2"
"href": "plotly-htmlwidgets-css-1.54.1"
},
"meta": null,
"script": null,
Expand All @@ -473,9 +473,9 @@
},
{
"name": "plotly-main",
"version": "1.52.2",
"version": "1.54.1",
"src": {
"href": "plotly-main-1.52.2"
"href": "plotly-main-1.54.1"
},
"meta": null,
"script": "plotly-latest.min.js",
Expand Down
8 changes: 4 additions & 4 deletions inst/examples/shiny/event_data/tests/mytest-expected/004.json
Original file line number Diff line number Diff line change
Expand Up @@ -461,9 +461,9 @@
},
{
"name": "plotly-htmlwidgets-css",
"version": "1.52.2",
"version": "1.54.1",
"src": {
"href": "plotly-htmlwidgets-css-1.52.2"
"href": "plotly-htmlwidgets-css-1.54.1"
},
"meta": null,
"script": null,
Expand All @@ -474,9 +474,9 @@
},
{
"name": "plotly-main",
"version": "1.52.2",
"version": "1.54.1",
"src": {
"href": "plotly-main-1.52.2"
"href": "plotly-main-1.54.1"
},
"meta": null,
"script": "plotly-latest.min.js",
Expand Down
2 changes: 1 addition & 1 deletion inst/htmlwidgets/lib/plotlyjs/locales/fr.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions inst/htmlwidgets/lib/plotlyjs/locales/pt-pt.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

58 changes: 56 additions & 2 deletions inst/htmlwidgets/lib/plotlyjs/plotly-latest.min.js

Large diffs are not rendered by default.

Loading