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

[FTR] Implement scrollIntoView util #165080

Merged
merged 5 commits into from
Aug 29, 2023

Conversation

tonyghiani
Copy link
Contributor

@tonyghiani tonyghiani commented Aug 29, 2023

📓 Summary

Based on the need for this test to scroll into the element independently of its existence in view, this PR exposes a new scrollIntoView method that replicates the behaviour of the native Element .scrollIntoView method.

@tonyghiani tonyghiani added release_note:skip Skip the PR/issue when compiling release notes backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) v8.11.0 labels Aug 29, 2023
@tonyghiani tonyghiani requested a review from a team as a code owner August 29, 2023 10:47
@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • /oblt-deploy-serverless : Deploy a serverless Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

Copy link
Member

@wayneseymour wayneseymour left a comment

Choose a reason for hiding this comment

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

Where is scrollIntoViewOptions defined?

@tonyghiani
Copy link
Contributor Author

Where is scrollIntoViewOptions defined?

It is the optional argument passed to the scrollIntoView function?
If instead, you are referring to the type ScrollIntoViewOptions, it is a global TS interface introduced in v3.7.7.

@wayneseymour
Copy link
Member

Where is scrollIntoViewOptions defined?

It is the optional argument passed to the scrollIntoView function? If instead, you are referring to the type ScrollIntoViewOptions, it is a global TS interface introduced in v3.7.7.

Globals always confuse me.
Thanks for clearing that up.

Copy link
Member

@wayneseymour wayneseymour left a comment

Choose a reason for hiding this comment

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

if we can do something about this then I'll give my thumbs up for sure

Copy link
Member

@wayneseymour wayneseymour left a comment

Choose a reason for hiding this comment

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

awesome! thanks again.

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

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

@tonyghiani tonyghiani merged commit 56c04d8 into elastic:main Aug 29, 2023
@tonyghiani tonyghiani deleted the ftr-scroll-into-view-util branch August 29, 2023 13:31
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Aug 29, 2023
## 📓 Summary

Based on the need for [this
test](https://github.com/elastic/kibana/pull/164493/files#diff-e0bb824023eef20a7b3742da023e25744a6c20406f59ae8400455c579153faeaR262)
to scroll into the element independently of its existence in view, this
PR exposes a new `scrollIntoView` method that replicates the behaviour
of the native [Element
.scrollIntoView](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView)
method.

---------

Co-authored-by: Marco Antonio Ghiani <[email protected]>
Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit 56c04d8)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Aug 29, 2023
## 📓 Summary

Based on the need for [this
test](https://github.com/elastic/kibana/pull/164493/files#diff-e0bb824023eef20a7b3742da023e25744a6c20406f59ae8400455c579153faeaR262)
to scroll into the element independently of its existence in view, this
PR exposes a new `scrollIntoView` method that replicates the behaviour
of the native [Element
.scrollIntoView](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView)
method.

---------

Co-authored-by: Marco Antonio Ghiani <[email protected]>
Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit 56c04d8)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
7.17
8.10
8.9

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Aug 29, 2023
## 📓 Summary

Based on the need for [this
test](https://github.com/elastic/kibana/pull/164493/files#diff-e0bb824023eef20a7b3742da023e25744a6c20406f59ae8400455c579153faeaR262)
to scroll into the element independently of its existence in view, this
PR exposes a new `scrollIntoView` method that replicates the behaviour
of the native [Element
.scrollIntoView](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView)
method.

---------

Co-authored-by: Marco Antonio Ghiani <[email protected]>
Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit 56c04d8)
kibanamachine added a commit that referenced this pull request Aug 29, 2023
# Backport

This will backport the following commits from `main` to `8.9`:
- [[FTR] Implement scrollIntoView util
(#165080)](#165080)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Marco Antonio
Ghiani","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-08-29T13:31:27Z","message":"[FTR]
Implement scrollIntoView util (#165080)\n\n## 📓 Summary\r\n\r\nBased on
the need for
[this\r\ntest](https://github.com/elastic/kibana/pull/164493/files#diff-e0bb824023eef20a7b3742da023e25744a6c20406f59ae8400455c579153faeaR262)\r\nto
scroll into the element independently of its existence in view,
this\r\nPR exposes a new `scrollIntoView` method that replicates the
behaviour\r\nof the native
[Element\r\n.scrollIntoView](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView)\r\nmethod.\r\n\r\n---------\r\n\r\nCo-authored-by:
Marco Antonio Ghiani <[email protected]>\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"56c04d88872bb22d4c941fda6262746e198c5505","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:prev-minor","v7.17.13","v8.11.0"],"number":165080,"url":"https://github.com/elastic/kibana/pull/165080","mergeCommit":{"message":"[FTR]
Implement scrollIntoView util (#165080)\n\n## 📓 Summary\r\n\r\nBased on
the need for
[this\r\ntest](https://github.com/elastic/kibana/pull/164493/files#diff-e0bb824023eef20a7b3742da023e25744a6c20406f59ae8400455c579153faeaR262)\r\nto
scroll into the element independently of its existence in view,
this\r\nPR exposes a new `scrollIntoView` method that replicates the
behaviour\r\nof the native
[Element\r\n.scrollIntoView](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView)\r\nmethod.\r\n\r\n---------\r\n\r\nCo-authored-by:
Marco Antonio Ghiani <[email protected]>\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"56c04d88872bb22d4c941fda6262746e198c5505"}},"sourceBranch":"main","suggestedTargetBranches":["7.17"],"targetPullRequestStates":[{"branch":"7.17","label":"v7.17.13","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/165080","number":165080,"mergeCommit":{"message":"[FTR]
Implement scrollIntoView util (#165080)\n\n## 📓 Summary\r\n\r\nBased on
the need for
[this\r\ntest](https://github.com/elastic/kibana/pull/164493/files#diff-e0bb824023eef20a7b3742da023e25744a6c20406f59ae8400455c579153faeaR262)\r\nto
scroll into the element independently of its existence in view,
this\r\nPR exposes a new `scrollIntoView` method that replicates the
behaviour\r\nof the native
[Element\r\n.scrollIntoView](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView)\r\nmethod.\r\n\r\n---------\r\n\r\nCo-authored-by:
Marco Antonio Ghiani <[email protected]>\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"56c04d88872bb22d4c941fda6262746e198c5505"}}]}]
BACKPORT-->

Co-authored-by: Marco Antonio Ghiani <[email protected]>
kibanamachine added a commit that referenced this pull request Aug 29, 2023
# Backport

This will backport the following commits from `main` to `8.10`:
- [[FTR] Implement scrollIntoView util
(#165080)](#165080)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Marco Antonio
Ghiani","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-08-29T13:31:27Z","message":"[FTR]
Implement scrollIntoView util (#165080)\n\n## 📓 Summary\r\n\r\nBased on
the need for
[this\r\ntest](https://github.com/elastic/kibana/pull/164493/files#diff-e0bb824023eef20a7b3742da023e25744a6c20406f59ae8400455c579153faeaR262)\r\nto
scroll into the element independently of its existence in view,
this\r\nPR exposes a new `scrollIntoView` method that replicates the
behaviour\r\nof the native
[Element\r\n.scrollIntoView](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView)\r\nmethod.\r\n\r\n---------\r\n\r\nCo-authored-by:
Marco Antonio Ghiani <[email protected]>\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"56c04d88872bb22d4c941fda6262746e198c5505","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:prev-minor","v7.17.13","v8.11.0"],"number":165080,"url":"https://github.com/elastic/kibana/pull/165080","mergeCommit":{"message":"[FTR]
Implement scrollIntoView util (#165080)\n\n## 📓 Summary\r\n\r\nBased on
the need for
[this\r\ntest](https://github.com/elastic/kibana/pull/164493/files#diff-e0bb824023eef20a7b3742da023e25744a6c20406f59ae8400455c579153faeaR262)\r\nto
scroll into the element independently of its existence in view,
this\r\nPR exposes a new `scrollIntoView` method that replicates the
behaviour\r\nof the native
[Element\r\n.scrollIntoView](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView)\r\nmethod.\r\n\r\n---------\r\n\r\nCo-authored-by:
Marco Antonio Ghiani <[email protected]>\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"56c04d88872bb22d4c941fda6262746e198c5505"}},"sourceBranch":"main","suggestedTargetBranches":["7.17"],"targetPullRequestStates":[{"branch":"7.17","label":"v7.17.13","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/165080","number":165080,"mergeCommit":{"message":"[FTR]
Implement scrollIntoView util (#165080)\n\n## 📓 Summary\r\n\r\nBased on
the need for
[this\r\ntest](https://github.com/elastic/kibana/pull/164493/files#diff-e0bb824023eef20a7b3742da023e25744a6c20406f59ae8400455c579153faeaR262)\r\nto
scroll into the element independently of its existence in view,
this\r\nPR exposes a new `scrollIntoView` method that replicates the
behaviour\r\nof the native
[Element\r\n.scrollIntoView](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView)\r\nmethod.\r\n\r\n---------\r\n\r\nCo-authored-by:
Marco Antonio Ghiani <[email protected]>\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"56c04d88872bb22d4c941fda6262746e198c5505"}}]}]
BACKPORT-->

Co-authored-by: Marco Antonio Ghiani <[email protected]>
kibanamachine added a commit that referenced this pull request Aug 29, 2023
# Backport

This will backport the following commits from `main` to `7.17`:
- [[FTR] Implement scrollIntoView util
(#165080)](#165080)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Marco Antonio
Ghiani","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-08-29T13:31:27Z","message":"[FTR]
Implement scrollIntoView util (#165080)\n\n## 📓 Summary\r\n\r\nBased on
the need for
[this\r\ntest](https://github.com/elastic/kibana/pull/164493/files#diff-e0bb824023eef20a7b3742da023e25744a6c20406f59ae8400455c579153faeaR262)\r\nto
scroll into the element independently of its existence in view,
this\r\nPR exposes a new `scrollIntoView` method that replicates the
behaviour\r\nof the native
[Element\r\n.scrollIntoView](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView)\r\nmethod.\r\n\r\n---------\r\n\r\nCo-authored-by:
Marco Antonio Ghiani <[email protected]>\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"56c04d88872bb22d4c941fda6262746e198c5505","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:prev-minor","v7.17.13","v8.11.0"],"number":165080,"url":"https://github.com/elastic/kibana/pull/165080","mergeCommit":{"message":"[FTR]
Implement scrollIntoView util (#165080)\n\n## 📓 Summary\r\n\r\nBased on
the need for
[this\r\ntest](https://github.com/elastic/kibana/pull/164493/files#diff-e0bb824023eef20a7b3742da023e25744a6c20406f59ae8400455c579153faeaR262)\r\nto
scroll into the element independently of its existence in view,
this\r\nPR exposes a new `scrollIntoView` method that replicates the
behaviour\r\nof the native
[Element\r\n.scrollIntoView](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView)\r\nmethod.\r\n\r\n---------\r\n\r\nCo-authored-by:
Marco Antonio Ghiani <[email protected]>\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"56c04d88872bb22d4c941fda6262746e198c5505"}},"sourceBranch":"main","suggestedTargetBranches":["7.17"],"targetPullRequestStates":[{"branch":"7.17","label":"v7.17.13","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/165080","number":165080,"mergeCommit":{"message":"[FTR]
Implement scrollIntoView util (#165080)\n\n## 📓 Summary\r\n\r\nBased on
the need for
[this\r\ntest](https://github.com/elastic/kibana/pull/164493/files#diff-e0bb824023eef20a7b3742da023e25744a6c20406f59ae8400455c579153faeaR262)\r\nto
scroll into the element independently of its existence in view,
this\r\nPR exposes a new `scrollIntoView` method that replicates the
behaviour\r\nof the native
[Element\r\n.scrollIntoView](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView)\r\nmethod.\r\n\r\n---------\r\n\r\nCo-authored-by:
Marco Antonio Ghiani <[email protected]>\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"56c04d88872bb22d4c941fda6262746e198c5505"}}]}]
BACKPORT-->

Co-authored-by: Marco Antonio Ghiani <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) release_note:skip Skip the PR/issue when compiling release notes v7.17.13 v8.9.2 v8.10.0 v8.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants