Skip to content
This repository has been archived by the owner on Aug 21, 2023. It is now read-only.

Add Export Services from Climate Change Lab #51

Merged
merged 3 commits into from
Apr 3, 2019

Conversation

ddohler
Copy link
Contributor

@ddohler ddohler commented Mar 29, 2019

Overview

Allows DataExportService and ImageExportService services to be used in both the Lab and Temperate.

Notes

This includes a modification to the ImageExportService to allow passing in the CSS selector for the chart's parent. This allows it to work in both Temperate and the Lab; previously it used a hard-coded value that only worked for the Lab.

Testing Instructions

Checklist

  • yarn run lint clean?
  • yarn run build:library clean?
  • npm pack clean?
  • CHANGELOG.md updated?

Connects azavea/temperate#1171

*
* @param parentSelector - Name of parent of chart, used to rewrite CSS selectors
*/
private chartOptions(parentSelector: string) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This used to be an object; apologies for including the switch to a function in the same commit that brings it over into the repo. There was a lot of friction to getting the Components repo linked in to both Temperate and the Lab, and by the time I got everything working, the WiP commits weren't in a place where it was super easy to split that functionality change apart. I'm happy to dive in and break this apart if you want to keep the commit history clean.

ddohler added 3 commits April 2, 2019 09:21
- Upgrades to latest version of save-svg-as-png to fix an issue with
downloading PNGs
- Adds a `selector` parameter to ImageExportService.downloadAsPNG() that
can be used to dynamically remap CSS selectors; the previous value was
hardcoded such that it worked only in the Lab.
@ddohler ddohler force-pushed the feature/dpd/add-export-services branch from a307b13 to daa5c0b Compare April 2, 2019 13:22
@ddohler
Copy link
Contributor Author

ddohler commented Apr 2, 2019

Fixed up the integrity deletions in yarn.lock.

Copy link
Contributor

@maurizi maurizi left a comment

Choose a reason for hiding this comment

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

Tested in both Temperate and the Lab and it seems to be working great 👍

@ddohler ddohler merged commit 1a8902f into develop Apr 3, 2019
@ddohler ddohler deleted the feature/dpd/add-export-services branch April 3, 2019 14:45
@ddohler ddohler removed the in review label Apr 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants