-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
Conversation
Pinging @elastic/kibana-gis (Team:Geo) |
@elasticmachine merge upstream |
There was a problem hiding this 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) { |
There was a problem hiding this comment.
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.
x-pack/legacy/plugins/maps/public/layers/styles/vector/components/field_select.js
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/maps/public/layers/styles/vector/components/field_select.js
Show resolved
Hide resolved
@elasticmachine merge upstream |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
…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>
* 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) ...
) (#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>
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.
Here is how it looks with multiple sources