Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Quick Search Data Changes Colors #284

Closed
PriyaDoIT opened this issue Jan 6, 2017 · 9 comments
Closed

Quick Search Data Changes Colors #284

PriyaDoIT opened this issue Jan 6, 2017 · 9 comments
Assignees
Labels

Comments

@PriyaDoIT
Copy link

PriyaDoIT commented Jan 6, 2017

This issue was found after release of v1.3.0 to chicago.opengrid.io in production
Originally entered by @reve0716

When grid auto refreshes upon movement the data points changes colors – This actions happens only for Quick Search:
(business_licenses 60602 or 60624) and (business_licenses)
Zooming in and out (using icons and mouse) or moving around the grid.

@PriyaDoIT PriyaDoIT changed the title Quick Search Quick Search Data Changes Colors Jan 6, 2017
@PriyaDoIT PriyaDoIT changed the title Quick Search Data Changes Colors Quick Search Data Changes Colors Jan 17, 2017
@PriyaDoIT PriyaDoIT added the bug label Jan 17, 2017
@nfspeedypur
Copy link
Contributor

This has been fixed in the Smart Chicago service repo.

@reve0716
Copy link
Contributor

The behavior is slightly different instead of changing to a different color upon each movement, it now changes between two colors when zooming in/ out or moving the grid based off data-sets.
Example:
business_licenses 60602 - color changes between the two colors of blue and pink.
building_permits 60604 and building_permits - color changes between blue and gold.
building_violations - color changes between red and gold.
food_inspections 60601 - color changes between Orange and sky blue.

@nfspeedypur
Copy link
Contributor

THis is interesting. Because this does not happen everytime. I will look into this today and see if i can figure out if there is an edgecase causing the process not to grab the cached color.

-David

@PriyaDoIT
Copy link
Author

Hello @nfspeedypur is there any update on this? Thanks

@PriyaDoIT
Copy link
Author

Update from @nfspeedypur
I believe I have found the cause of this issue. However the issue is not easily resolved.

Problem: Quick Search Data Changes Colors

Cause: The OpenGrid.io service layer code is designed to generate the dataset's metadata on start up. This is due to the fact that we are not storing OG related meta data on Plenar.io, which is our only database. This means that each server that is running the service layer code has to generate it's own metadata. The dataset to color mapping is done randomly, which means that each server could have its own mappings. What I don't understand completely is why the standard search does not see this same issue. My only guess is that the standard 'Find Data' search is using the UI layer's cached color for the dataset. I am not sure why the quick search does not use that same value on the UI side.

Possible Solutions:
• I can update the OG service side code to loop through a preset list of colors, in a given order, when assigning a color to a dataset. This would mean that color mappings have a much better chance of being the same. However there is no guarantee that they will be the same.
• I can update the OG code to write this meta data to a central data store, mySQL or DynamoDB. However this update would be much more significant effort as the project does not currently have that integration.

-David

@PriyaDoIT
Copy link
Author

hello @nfspeedypur we would like to proceed with your first solution above.

@nfspeedypur
Copy link
Contributor

I have deployed the first solution to production. I not longer see this issue. Tell me if you see this issue come back.

@reve0716
Copy link
Contributor

reve0716 commented Mar 27, 2017

I will begin testing in production.
@PriyaDoIT and @nfspeedypur the data looks good.

@PriyaDoIT
Copy link
Author

Hello @reve0716 can we close this issue?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants