-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Vis: Default editor] EUIficate region map options tab #42944
[Vis: Default editor] EUIficate region map options tab #42944
Conversation
# Conflicts: # src/legacy/core_plugins/kbn_vislib_vis_types/public/controls/select.tsx # src/legacy/core_plugins/kbn_vislib_vis_types/public/utils/with_injected_dependencies.tsx # src/legacy/core_plugins/tile_map/public/components/wms_options.tsx
…ns/region_map_options # Conflicts: # src/legacy/core_plugins/region_map/public/region_map_vis_params.js # src/legacy/core_plugins/region_map/public/shim/legacy_dependencies_plugin.ts # src/legacy/core_plugins/region_map/public/types.ts
Pinging @elastic/kibana-app |
💔 Build Failed |
…ns/region_map_options
…ns/region_map_options
48cccc2
to
77a903c
Compare
💔 Build Failed |
💔 Build Failed |
💚 Build Succeeded |
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.
LGTM, tested on Chrome Mac.
Please don't forget about refactoring from #42944 (review)
src/legacy/core_plugins/region_map/public/components/region_map_options.tsx
Outdated
Show resolved
Hide resolved
…ns/region_map_options
💚 Build Succeeded |
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.
Code mostly LGTM with two small nits/hints. I think it makes sense to revisit the possible usability issue in the gif above - it just feels strange for the user to have a one-way path in the UI they can't get back from IMHO. Maybe it was discussed already somewhere else.
setEmsHotLink(newLayer); | ||
} | ||
}, | ||
[vectorLayers] |
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.
nit: should also include setValue
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.
Currently we build the logic with static setValue
prop, but it could be changed in the future.. so it would make sense to watch it also. Thnx!
return clonedLayer; | ||
} | ||
export const mapToLayerWithId = (prefix: string, layer: FileLayer): VectorLayer => ({ | ||
...layer, |
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.
The removal of cloneDeep means that the FileLayerField
objects and the array of those objects in the layer will reference the original ones. Are we sure they are not mutated somewhere? This could cause some bugs that are hard to track down.
It might be totally fine, just to make sure as I'm not familiar with the control flow in that part of the code.
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.
I've checked the code flow and these values are read-only. Also FileLayer
array comes straight from the server, so they are safe for modifying.
Of course I could keep the cloneDeep
here, but didn't see a necessity in it and skip for a performance boost.
Hey, @flash1293 ! Also, there is the logic with setting the default value from this dropdown (the first availabale) after initialization. But currently it doesn't work as expected due to existing issue. It caused by inner visualization building logic and does't depend on this PR, so I will prepare a fix for it in a separate PR. After the fix we won't have empty value in the dropdown. |
…ns/region_map_options # Conflicts: # src/legacy/core_plugins/kbn_vislib_vis_types/public/controls/select.tsx
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.
LGTM in this case, thanks for your explanation!
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.
I think we can get rid of sleeps and use innerHtml to get options text in the functional tests
💚 Build Succeeded |
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.
LGTM
💚 Build Succeeded |
* EUIficate region_map_options * Reuse types * Remove wms_options directive * Remove style import * Fix issue with join field default value # Conflicts: # src/legacy/core_plugins/region_map/public/region_map_vis_params.html
* EUIficate region_map_options * Reuse types * Remove wms_options directive * Remove style import * Fix issue with join field default value # Conflicts: # src/legacy/core_plugins/region_map/public/region_map_vis_params.html
Summary
A part of #38273.
EUIfication of the
Option
s tab in theRegion map
vis.This also fix #36017.
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.For maintainers