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

[Canvas] Fix group layering #114346

Merged
merged 6 commits into from
Nov 17, 2021
Merged

[Canvas] Fix group layering #114346

merged 6 commits into from
Nov 17, 2021

Conversation

crob611
Copy link
Contributor

@crob611 crob611 commented Oct 7, 2021

Fixes #114073
Fixes #46782

Elements and groups are combined into a single array, and then each is given a z layer value based on the index in that array.

So all groups were "higher" than every single element. So any single element could be over every element in the group, but the group would be selected if you click on it.

This change gives groups a z layer value equal to the highest z layer value of its children.

This also works for a group that is made up of other groups. The parent group will get the z-layer of the child group which gets the z-layer of it's highest child.

Edit....
Turns out that wasn't what was causing the bug on the original issue. That was caused by an element rotated to 90 or -90deg also getting an incorrect z layer in aero elastic. I've pushed a commit to fix that issue as well.

@crob611 crob611 requested a review from a team as a code owner October 7, 2021 18:50
@crob611
Copy link
Contributor Author

crob611 commented Oct 7, 2021

@elasticmachine merge upstream

@crob611
Copy link
Contributor Author

crob611 commented Oct 12, 2021

@elasticmachine merge upstream

@crob611 crob611 added Feature:Canvas loe:small Small Level of Effort release_note:skip Skip the PR/issue when compiling release notes Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v7.16.0 v8.0.0 labels Oct 12, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@crob611 crob611 added review auto-backport Deprecated - use backport:version if exact versions are needed labels Oct 12, 2021
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
canvas 1.0MB 1.0MB +233.0B

History

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

@poffdeluxe
Copy link
Contributor

@elasticmachine merge upstream

1 similar comment
@crob611
Copy link
Contributor Author

crob611 commented Nov 1, 2021

@elasticmachine merge upstream

@poffdeluxe
Copy link
Contributor

Unless I'm misunderstanding, it still seems like the issue is still happening

:

@crob611
Copy link
Contributor Author

crob611 commented Nov 16, 2021

@elasticmachine merge upstream

@elastic elastic deleted a comment from kibanamachine Nov 16, 2021
Copy link
Contributor

@poffdeluxe poffdeluxe left a comment

Choose a reason for hiding this comment

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

Great work, Dr. Robertson

@poffdeluxe
Copy link
Contributor

Will also fix #46782

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Test Failures

  • [job] [logs] Default CI Group #13 / search examples Search session example should start search, save session, restore session using "restore" button

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
canvas 1015.3KB 1015.5KB +240.0B

History

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

@crob611 crob611 removed the v7.16.0 label Nov 17, 2021
@crob611 crob611 merged commit ac0f2a3 into elastic:main Nov 17, 2021
@kibanamachine
Copy link
Contributor

The following labels were identified as gaps in your version labels and will be added automatically:

  • v8.1.0

If any of these should not be on your pull request, please manually remove them.

@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
8.0

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Nov 17, 2021
* Fix group layering

* Fixes incorrect z-layers for elements at 90deg

Co-authored-by: Kibana Machine <[email protected]>
kibanamachine added a commit that referenced this pull request Nov 17, 2021
* Fix group layering

* Fixes incorrect z-layers for elements at 90deg

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Corey Robertson <[email protected]>
TinLe pushed a commit to TinLe/kibana that referenced this pull request Nov 20, 2021
* Fix group layering

* Fixes incorrect z-layers for elements at 90deg

Co-authored-by: Kibana Machine <[email protected]>
dmlemeshko pushed a commit that referenced this pull request Nov 29, 2021
* Fix group layering

* Fixes incorrect z-layers for elements at 90deg

Co-authored-by: Kibana Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed Feature:Canvas loe:small Small Level of Effort release_note:skip Skip the PR/issue when compiling release notes review Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v8.0.0 v8.1.0
Projects
None yet
5 participants