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

Migrate Map visualization to React #4278

Merged
merged 17 commits into from
Nov 20, 2019
Merged

Migrate Map visualization to React #4278

merged 17 commits into from
Nov 20, 2019

Conversation

kravets-levko
Copy link
Collaborator

@kravets-levko kravets-levko commented Oct 22, 2019

What type of PR is this? (check all applicable)

  • Refactor

Description

  • Convert component to React
    • Renderer
    • Editor
      • General tab
      • Groups tab
      • Style tab
  • Refine code
  • Cleanup
  • Tests

Related Tickets & Documents

#3301 (Migrate Visualizations to React -> Map)

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

image
image
image

Copy link
Contributor

@ranbena ranbena left a comment

Choose a reason for hiding this comment

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

Overall looks good. Found bug.

client/app/visualizations/map/initMap.js Outdated Show resolved Hide resolved
client/app/visualizations/map/Editor/StyleSettings.jsx Outdated Show resolved Hide resolved
@kravets-levko
Copy link
Collaborator Author

kravets-levko commented Oct 28, 2019

@ranbena noticed that marker cluster icon style is inconsistent depending on "Group by" option. I implemented a fix which IMO looks much better, but now marker group icons look slightly different (see screenshots). It's a kind of breaking change, so I need your opinion - @arikfr, @ranbena, @gabrieldutra - should we keep old version on new one?

before:

Note: green markers have default style set by Leaflet - settings from "Groups" tab are completely ignored.

image
image

after:

Note: on both screenshots markers use colors defined on "Groups" tab.

image
image

@ranbena
Copy link
Contributor

ranbena commented Oct 28, 2019

@ranbena noticed that marker cluster icon style is inconsistent depending on "Group by" option. I implemented a fix which IMO looks much better, but now marker group icons look slightly different (see screenshots). It's a kind of breaking change, so I need your opinion - @arikfr, @ranbena, @gabrieldutra - should we keep old version on new one?

I played around with it and it behaves very sensibly 👍

@arikfr
Copy link
Member

arikfr commented Nov 13, 2019

One thing I noticed is that the Groups tab won't show the current color unless you change it (you can see this with: https://deploy-preview-4278--redash-preview.netlify.com/queries/49#118).

@kravets-levko
Copy link
Collaborator Author

One thing I noticed is that the Groups tab won't show the current color unless you change it

We have something like this in other visualizations (e.g. Chart) - when you choose Auto color - it does not show actual color in editor.

@arikfr
Copy link
Member

arikfr commented Nov 13, 2019

One thing I noticed is that the Groups tab won't show the current color unless you change it

We have something like this in other visualizations (e.g. Chart) - when you choose Auto color - it does not show actual color in editor.

Good point. I think that in the chart editor it's less confusing, because in the current color picker UI for charts, at least when you click on it, it tells you it's automatic and if it's automatic the preview is empty. Here it shows the "transparent" color icon, which is a bit confusing imo.

How about we use an "A" to signal automatic color? And maybe show a tooltip saying the same when hovering over it?

@kravets-levko kravets-levko changed the title Migrate Map visualization to React (WIP) Migrate Map visualization to React Nov 14, 2019
@kravets-levko
Copy link
Collaborator Author

@arikfr How about something like this?

image

@arikfr
Copy link
Member

arikfr commented Nov 20, 2019

@arikfr How about something like this?

This is an optional behavior, right? Not sure it will "fit" everywhere where we use the color picker.
But don't you like changing the icon of the automatic color to be an "A"?

@kravets-levko
Copy link
Collaborator Author

@arikfr Yes, this is optional behavior. I tried to add a tooltip (does not work fine with color picker's popover), tried adding letter "A" (code looked a bit ugly and it still wasn't easy to understand what that mean). I ended up with this variant.

@kravets-levko kravets-levko changed the title (WIP) Migrate Map visualization to React Migrate Map visualization to React Nov 20, 2019
@arikfr
Copy link
Member

arikfr commented Nov 20, 2019

@kravets-levko ok, let's move on and maybe figure something else if needed. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants