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

Add scroll_to_center method. #2255

Merged
merged 5 commits into from
Apr 11, 2023
Merged

Add scroll_to_center method. #2255

merged 5 commits into from
Apr 11, 2023

Conversation

rodrigogiraoserrao
Copy link
Contributor

This will close #2031.

@rodrigogiraoserrao rodrigogiraoserrao marked this pull request as ready for review April 11, 2023 13:26
src/textual/widget.py Outdated Show resolved Hide resolved
@@ -406,3 +406,13 @@ def test_fr_margins(snap_compare):
def test_scroll_visible(snap_compare):
# https://github.com/Textualize/textual/issues/2181
assert snap_compare(SNAPSHOT_APPS_DIR / "scroll_visible.py", press=["t"])


def test_scroll_to_center(snap_compare):
Copy link
Collaborator

Choose a reason for hiding this comment

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

If this test is expected to fail, can you mark is as an xfail ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test is not expected to fail now. It will fail eventually, when the bug is fixed.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Got you.

@rodrigogiraoserrao rodrigogiraoserrao merged commit 48e8b51 into main Apr 11, 2023
@rodrigogiraoserrao rodrigogiraoserrao deleted the scroll_to_center branch April 11, 2023 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement scroll_to_center method
2 participants