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

[BUG][Discover] Enable 'Back to Top' Feature in Discover for scrolling to top #6008

Merged
merged 2 commits into from
Mar 4, 2024

Conversation

ananzh
Copy link
Member

@ananzh ananzh commented Mar 3, 2024

Description

dscCanvas is the one with scrollable prop. Set window.scrollTo(0, 0) on table will not work. In this PR, we add a ref to EuiPanel directly.

Issues Resolved

#6006

Screenshot

backtotop.mov

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

@ananzh
Copy link
Member Author

ananzh commented Mar 4, 2024

Add Function Test Suite 11: Infinity Scroll in Legacy Table in #5713 to function meta issue.
We will add a new test suite in the functional test repo to test this bug.

…g to top

dscCanvas is the one with scrollable prop. Set window.scrollTo(0, 0) on table will
not work. In this PR, we add a ref to EuiPanel directly.

Issue Resolve:
opensearch-project#6006

Signed-off-by: Anan Zhuang <[email protected]>
@ananzh ananzh marked this pull request as ready for review March 4, 2024 01:58
@ananzh ananzh changed the title Fix 6007 in another way [BUG][Discover] Enable 'Back to Top' Feature in Discover for scrolling to top Mar 4, 2024
CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Miki <[email protected]>
Signed-off-by: Anan Zhuang <[email protected]>
Copy link
Member

@ashwin-pc ashwin-pc left a comment

Choose a reason for hiding this comment

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

Ideally I'd pass the panel ref down the tree instead of the function itself since a ref will not cause any rerenders and can be used for other purposes as well. If you can change the prop being sent down to that, let's do it.

@ananzh
Copy link
Member Author

ananzh commented Mar 4, 2024

Ideally I'd pass the panel ref down the tree instead of the function itself since a ref will not cause any rerenders and can be used for other purposes as well. If you can change the prop being sent down to that, let's do it.

k. let me try it.

@ananzh ananzh merged commit d407f55 into opensearch-project:main Mar 4, 2024
14 checks passed
@ananzh ananzh added bug Something isn't working discover for discover reinvent v2.13.0 backport 2.x labels Mar 4, 2024
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 4, 2024
…g to top (#6008)

* [BUG][Discover] Enable 'Back to Top' Feature in Discover for scrolling to top

dscCanvas is the one with scrollable prop. Set window.scrollTo(0, 0) on table will
not work. In this PR, we add a ref to EuiPanel directly.

Issue Resolve:
#6006

---------

Signed-off-by: Anan Zhuang <[email protected]>
Co-authored-by: Miki <[email protected]>
(cherry picked from commit d407f55)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
ananzh added a commit that referenced this pull request Mar 4, 2024
…g to top (#6008)

* [BUG][Discover] Enable 'Back to Top' Feature in Discover for scrolling to top

dscCanvas is the one with scrollable prop. Set window.scrollTo(0, 0) on table will
not work. In this PR, we add a ref to EuiPanel directly.

Issue Resolve:
#6006

---------

Signed-off-by: Anan Zhuang <[email protected]>
Co-authored-by: Miki <[email protected]>
ashwin-pc pushed a commit that referenced this pull request Mar 18, 2024
…g to top (#6008) (#6011)

* [BUG][Discover] Enable 'Back to Top' Feature in Discover for scrolling to top

dscCanvas is the one with scrollable prop. Set window.scrollTo(0, 0) on table will
not work. In this PR, we add a ref to EuiPanel directly.

Issue Resolve:
#6006

---------

Signed-off-by: Anan Zhuang <[email protected]>
Co-authored-by: Miki <[email protected]>
(cherry picked from commit d407f55)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
SuZhou-Joe pushed a commit to SuZhou-Joe/OpenSearch-Dashboards that referenced this pull request Apr 7, 2024
…g to top (opensearch-project#6008)

* [BUG][Discover] Enable 'Back to Top' Feature in Discover for scrolling to top

dscCanvas is the one with scrollable prop. Set window.scrollTo(0, 0) on table will
not work. In this PR, we add a ref to EuiPanel directly.

Issue Resolve:
opensearch-project#6006

---------

Signed-off-by: Anan Zhuang <[email protected]>
Co-authored-by: Miki <[email protected]>
SuZhou-Joe pushed a commit to ruanyl/OpenSearch-Dashboards that referenced this pull request Apr 7, 2024
…g to top (opensearch-project#6008)

* [BUG][Discover] Enable 'Back to Top' Feature in Discover for scrolling to top

dscCanvas is the one with scrollable prop. Set window.scrollTo(0, 0) on table will
not work. In this PR, we add a ref to EuiPanel directly.

Issue Resolve:
opensearch-project#6006

---------

Signed-off-by: Anan Zhuang <[email protected]>
Co-authored-by: Miki <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants