[Lens] allow drag and drop reorder on xyChart for y dimension#84640
[Lens] allow drag and drop reorder on xyChart for y dimension#84640mbondyra merged 10 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/kibana-app (Team:KibanaApp) |
|
@elasticmachine merge upstream |
|
This is happening because for the rendered chart, we reorder the accessors array based on the table column order in the to_expression function, but we use the original layer objects from the state in the getConfiguration call to get the colors for the dimension triggers. In getConfiguration we should reorder the accessors in the same way before calculating the “colorAssignments” object |
…/kibana into lens/drag_n_drop_for_xy
…g_n_drop_for_xy # Conflicts: # x-pack/plugins/lens/public/xy_visualization/visualization.tsx
8346fea to
eaf5918
Compare
flash1293
left a comment
There was a problem hiding this comment.
Tested in Chrome and works as expected. As discussed this is not a perfect solution and we should revisit the whole logic of keeping column orders in sync in general. @mbondyra Could you open a tech debt issue for this?
I left a nit about the test as I would like to get rid of the testing of internals via mocking a dependency, but I don't think another round of review is required.
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
wylieconlon
left a comment
There was a problem hiding this comment.
LGTM, tested again and the bug is fixed!
…c#84640) * [Lens] allow drag and drop on xyChart for y dimension * wip * tests * dimension panel fix * eslint * fix test Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* master: (28 commits) [Actions] fixes bug where severity is auto selected but not applied to the action in PagerDuty (elastic#84891) Only attempt to rollover signals index if version < builtin version (elastic#84982) skip flaky suite (elastic#84978) skip lens rollup tests Add geo containment tracking alert type (elastic#84151) Changed rollup tests to use test user rather than elastic super user. (elastic#79567) skip 'should allow creation of lens xy chart' elastic#84957 [APM] Add log_level/sanitize_field_names config options to Python Agent (elastic#84810) [Maps] geo line source (elastic#76572) [data.search] Move search method inside session service and add tests (elastic#84715) skip lens drag and drop test. elastic#84941 [Ingest Node Pipelines] Integrate painless autocomplete (elastic#84554) [Lens] allow drag and drop reorder on xyChart for y dimension (elastic#84640) [Lens] Fix error when selecting the current field again (elastic#84817) [Metrics UI] Add metadata tab to node details flyout (elastic#84454) [CI] Enables APM collection (elastic#81731) [Workplace Search] Migrate Sources Schema tree (elastic#84847) Disable checking for conflicts when copying saved objects (elastic#83575) [SECURITY_SOLUTION] delete advanced Policy fields when they are empty (elastic#84368) y18n 4.0.0 -> 4.0.1 (elastic#84905) ...
#84937) * [Lens] allow drag and drop on xyChart for y dimension * wip * tests * dimension panel fix * eslint * fix test Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Summary
As we recently merged #84223 which solved this: elastic/elastic-charts#868 , we are safe to enable drag and drop reordering on xy chart 🙌