Skip to content

Conversation

chschan
Copy link

@chschan chschan commented Oct 28, 2024

Updates JS bundle to use the latest version (2.35.2). Note that the original R plotly library is only up to 2.11.1 so we have not synced from there.

Tests running on https://testlord.displayr.com:20344/Status

@chschan chschan changed the title Update to use plotly 2.35.2 FS-2955: Update to use plotly 2.35.2 Oct 28, 2024
@chschan chschan requested a review from JustinCCYap October 28, 2024 03:55
@JustinCCYap JustinCCYap changed the title FS-2955: Update to use plotly 2.35.2 FS2-2955: Update to use plotly 2.35.2 Oct 28, 2024
attrs_name_check(
sub("[0-9]+$", "", names(p$x$layout)),
c(names(Schema$layout$layoutAttributes), c("barmode", "bargap", "bargroupgap", "mapType")),
c(names(Schema$layout$layoutAttributes), c("barmode", "bargap", "bargroupgap", "barcornerradius", "mapType")),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious how did you know to change this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it for bargroup gap a while ago as well. If you try to use barcornerradius you get an ugly warning. I set option(warning=2) to make it an error and checked the stack trace

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. So that means we could get rounded corners just from this PR?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, rounded corners will work with this. Is there anything else we needed?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JustinCCYap
Copy link

Would it be necessary to update the R plotly library as well or can the 2 be done separately?

@chschan
Copy link
Author

chschan commented Oct 28, 2024

What do you mean the R plotly library? Our other flip packages depend on this one (e.g. https://github.com/Displayr/flipStandardCharts/blob/master/DESCRIPTION#L50), so they'll get this change if we merge this in

@chschan
Copy link
Author

chschan commented Oct 28, 2024

I am wondering if we should do a sync with plot/plotly.R but their JS bundle is so far behind, it doesn't seem worthwhile. A lot of the changes were with functions we don't use

@JustinCCYap
Copy link

I was using the term from your description. I meant merge in the commits from the original plotly repo that the fork is based on. So you think it is not worthwhile. I think we should document this perhaps in the README?

@chschan
Copy link
Author

chschan commented Oct 28, 2024

The main thing we are missing is changes for compatibility with the updated ggplot2. I'm not familiar with it, but some users might have written some custom code to use it. I feel like we can leave it until someone complains about new features not working? (I feel that change will probably break someone else's code so I want to defer)

@JustinCCYap
Copy link

The main thing we are missing is changes for compatibility with the updated ggplot2. I'm not familiar with it, but some users might have written some custom code to use it. I feel like we can leave it until someone complains about new features not working? (I feel that change will probably break someone else's code so I want to defer)

I don't understand much about how ggplot2 works with plotly, how do users write custom code to use it if we haven't updated our ploty repo?

Copy link

@JustinCCYap JustinCCYap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. We'll need to figure out what other steps need to be done before merging this. E.g., testing ngvizes with the new plotly version and finding where else the plotly version is hardcoded. and determining the order of these steps.

@chschan chschan merged commit e339280 into master Nov 28, 2024
2 checks passed
chschan added a commit that referenced this pull request Sep 28, 2025
* Use latest bundle 2.35.2

* Turn off warning for barcornerradius

* Add documentation

* Only run standard tests

* Remove github workflow

* Remove travis CI config

* Use same circle CI config as other flip packages

* Replace with default config

* Try to turn off all tests

* Stop returning error

* Turn off build
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.

2 participants