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

[Maps] show field type icons in data driven styling field select #55166

Merged
merged 5 commits into from
Jan 21, 2020

Conversation

nreese
Copy link
Contributor

@nreese nreese commented Jan 17, 2020

Users have no way of knowing the field type while selecting a field for data driven styling. This is a problem since field type will determine whether the styling is quantitative or qualitative. This PR fixes this problem by showing the field icon next to the field name. The PR also removes state from DynamicColorForm component since color map type is stored in the style descriptor.

Screen Shot 2020-01-17 at 8 38 49 AM

Here is how it looks with multiple sources
Screen Shot 2020-01-17 at 8 36 59 AM

@nreese nreese requested a review from a team as a code owner January 17, 2020 12:19
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-gis (Team:Geo)

@nreese
Copy link
Contributor Author

nreese commented Jan 20, 2020

@elasticmachine merge upstream

Copy link
Contributor

@thomasneirynck thomasneirynck 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 chrome and works. very nice visual addition 💎

to reduce the line-change and keep this PR more condensed for a possible 7.6 backport (no strong feelings, I'm ok either way), consider removing the fiddly if-else-then rewrites, they add the majority of the change-noise which isn't actually a change.

colorMapType={COLOR_MAP_TYPE.ORDINAL}
color={styleOptions.color}
customColorMap={styleOptions.customColorRamp}
useCustomColorMap={_.get(styleOptions, 'useCustomColorRamp', false)}
compressed
/>
);
} else if (this.state.colorMapType === COLOR_MAP_TYPE.CATEGORICAL) {
Copy link
Contributor

Choose a reason for hiding this comment

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

by removing these else-ifs, reading the code, you really loose coherence and advantage of consistent indentation. these (categoical/ordinal) are equally weighted code-paths. putting returns at different levels removes all that context. removing the categorical check requires users to keep in their head the "else" iso just being able to read it.

@nreese
Copy link
Contributor Author

nreese commented Jan 21, 2020

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@nreese nreese changed the title [Maps] show field icons in data driven styling field select [Maps] show field type icons in data driven styling field select Jan 21, 2020
@nreese nreese merged commit 04374e6 into elastic:master Jan 21, 2020
nreese added a commit to nreese/kibana that referenced this pull request Jan 21, 2020
…stic#55166)

* [Maps] show field icons in data driven styling field select

* only show origin group label when there is more then one origin

* review feedback

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jan 22, 2020
* master: (38 commits)
  [ML] Fix counters and percentages for array fields on the Data visualizer page (elastic#55209)
  [SIEM][Detection Engine] Tags being turned into null
  rules part deux (elastic#55507)
  [DOCS] Add tip for using elasticsearch-certutil http command (elastic#55357)
  [SIEM][Detection Engine] Critical blocker, fixes schema accepting values it should not (elastic#55488)
  [SIEM] Detections create prepackage rules (elastic#55403)
  [Reporting] Convert CSV Export libs to Typescript (elastic#55117)
  [Maps] show field type icons in data driven styling field select (elastic#55166)
  Adds event log for actions and alerting (elastic#45081)
  [SIEM][Detection Engine] Fixes critical blocker where signals on signals are not operating
  [SIEM][Detection Engine] Critical blocker, adds need REST prefix for cloud
  remove incorrect config (elastic#55427)
  Retain pinned filters when loading and clearing saved queries (elastic#54307)
  Resolver zoom, pan, and center controls (elastic#55221)
  Skip failing endpoint saga tests
  [skip-ci] Update migration guide to add rendering service example (elastic#54744)
  [DOCS] Updates to heat map page (elastic#55097)
  [Endpoint] Fix saga to start only after store is created and stopped on app unmount (elastic#55245)
  [Logs UI] Use the correct icons and labels in the feature cont… (elastic#55292)
  [Uptime] Handle locations with names but no geo data (elastic#55234)
  ...
nreese added a commit that referenced this pull request Jan 22, 2020
) (#55491)

* [Maps] show field icons in data driven styling field select

* only show origin group label when there is more then one origin

* review feedback

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants