EQWorks / widget-studio

Widget-creating tool for charts, maps, tables, stats
https://eqworks.github.io/widget-studio/
2 stars 3 forks source link

[G2M] Map - scatterplot layer new design #55

Closed geoerika closed 2 years ago

geoerika commented 2 years ago

Changes:

  1. Adapted state for map widget use
  2. Moved getLongest to util/index.js to have it available for other components
  3. Adjusted useTransformedData to work with map widget
  4. Moved setting numericColumns and stringColumns in view/index.js so we ave it available for widget icon buttons, as map icon is enabled only if we have coordinates got geo keys present in numericColumns
  5. Changed map widget controller for scatterplot layer to new design
  6. Add zeroVarianceColumns.includes(key) condition when calculating renderableValueKeys

Closes #58

Screen Shot 2022-01-10 at 10 18 52 AM
github-actions[bot] commented 2 years ago

📚 Storybook preview (updated to 25173993ba4943537ef96c735efc57473194bd63)

vxsl commented 2 years ago

@sallkall Agreed that the empty dropdown is problematic, but I'm not sure that showing all key options in the dropdown is a good idea. What happens in the case that you already have 4 selected value keys? Would you see 4 highlighted choices in the dropdown?

sallkall commented 2 years ago

@sallkall Agreed that the empty dropdown is problematic, but I'm not sure that showing all key options in the dropdown is a good idea. What happens in the case that you already have 4 selected value keys? Would you see 4 highlighted choices in the dropdown?

yep, here's how multi-select looks in lumen labs right now: image

in the original design there were even check marks beside each selected ones: image

we should show it when an option(s) is selected - this is conventional in almost all UI libraries

vxsl commented 2 years ago

@sallkall Ok cool sounds good, will fix in an upcoming PR. :+1:

sallkall commented 2 years ago

@vxsl thanks!

sallkall commented 2 years ago

@vxsl you can use the Select component guide for reference, in there you should find all the option type and states