Skip to content
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

Card layouts that don't include a visualization will trigger an unecessary API call #1114

Open
3 tasks
jaronheard opened this issue Oct 21, 2019 · 0 comments
Open
3 tasks
Labels
bug type:platform Issues that are impact the entire Civic project

Comments

@jaronheard
Copy link
Contributor

jaronheard commented Oct 21, 2019

Description

If you look at the network tab (especially on civicplatform.org/cards), you will see that API requests are being triggered for all of the cards previewed on the page, despite the previews not showing a visualization.

The API call is triggered in the index.js file for the card.

For this bug to be considered fixed, the following should be completed:

  • Find an approach that will prevent CardLayouts that don't include the visualization from triggering an API call
  • This approach is applied to all existing cards
  • NewCard hygen template updated to use this pattern

Steps to reproduce

Go to one of the following pages with the network tab of developer tools open:
http://civicplatform.org/cards/
http://civicplatform.org/cards/holc-redlining

Observe requests to different endpoints under service.civicpdx.org

Expected result

Should only make API calls for card layouts where visualizations are shown

Actual result

Makes API calls for all card layouts, including previews that only show card text

Environment

Production environment

@jaronheard jaronheard added bug type:platform Issues that are impact the entire Civic project labels Oct 21, 2019
@jaronheard jaronheard changed the title Card layouts that don't include a visualization will trigger an API call. Card layouts that don't include a visualization will trigger an unecessary API call Oct 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug type:platform Issues that are impact the entire Civic project
Projects
None yet
Development

No branches or pull requests

1 participant