Skip to content

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

Merged
nreese merged 5 commits intoelastic:masterfrom
nreese:by_value_field_icons
Jan 21, 2020
Merged

[Maps] show field type icons in data driven styling field select#55166
nreese merged 5 commits intoelastic:masterfrom
nreese:by_value_field_icons

Conversation

@nreese
Copy link
Copy Markdown
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 added release_note:fix Team:Geo Former Team Label for Geo Team. Now use Team:Presentation v8.0.0 v7.7.0 v7.6.0 labels Jan 17, 2020
@nreese nreese requested a review from thomasneirynck January 17, 2020 12:19
@nreese nreese requested a review from a team as a code owner January 17, 2020 12:19
@elasticmachine
Copy link
Copy Markdown
Contributor

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

@nreese
Copy link
Copy Markdown
Contributor Author

nreese commented Jan 20, 2020

@elasticmachine merge upstream

Copy link
Copy Markdown
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.

compressed
/>
);
} else if (this.state.colorMapType === COLOR_MAP_TYPE.CATEGORICAL) {
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

nreese commented Jan 21, 2020

@elasticmachine merge upstream

@kibanamachine
Copy link
Copy Markdown
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

release_note:enhancement Team:Geo Former Team Label for Geo Team. Now use Team:Presentation v7.7.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants