Readded buttons and removed unnecessary buttons
Description
There was a desire to use plotly buttons since there were certain desired features such as saving a png of the chart. However, enabling buttons displayed too many buttons and undesired features.
Partly Addresses #1160 & #1161
I enabled buttons on all chart component and removed buttons that doesn't correctly interact with OED, redundant or isn't useful.
Type of change
- [ ] Note merging this changes the database configuration.
- [x] This change requires a documentation update
Checklist
- [x] I have followed the OED pull request ideas
- [x] I have removed text in ( ) from the issue request
- [x] You acknowledge that every person contributing to this work has signed the OED Contributing License Agreement and each author is listed in the Description section.
Limitations
Add a button to display advance buttons. In this case users should see a download png button, the plotly icon and the advance feature button when loading up a graph and clicking the advance feature button should display the advance buttons.
For the record, I merged development so the DB is the latest.
Implemented advanced button feature to all graphics.
Thanks to @williamw04 for the updated code. I've made a few comments to address. Also, I am getting a warning on compile of:
web-1 | Failed to parse source map from '/usr/src/app/node_modules/@plotly/mapbox-gl/dist/mapbox-gl-unminified.js.map' file: Error: ENOENT: no such file or directory, open '/usr/src/app/node_modules/@plotly/mapbox-gl/dist/mapbox-gl-unminified.js.map'I don't think it was there before. I wonder if it relates to the change in the includes (but I have not looked at it).
I tried to resolve this. I found this plotly GitHub issue that might have been related (for different package). It was resolved very recently. I don't know what it means for webpack given the shift in plotly compiles.
I tried upgrading plotly packages to the latest with npm i [email protected] @types/[email protected] @types/[email protected] but this did not resolve it (actually there are now two warnings). It seems that the packages are old enough not to include recent changes.
There are ways to stop creating the source map but I did not try and had mixed feelings.
Does anyone have other thoughts/ideas?
The warning is not going away so going to live with it for now. I'm leaving this comment so people know about it.