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

scrollbar-gutter causes loading overlay to not fully overlay #3733

Closed
davep opened this issue Nov 22, 2023 · 7 comments · Fixed by #3816
Closed

scrollbar-gutter causes loading overlay to not fully overlay #3733

davep opened this issue Nov 22, 2023 · 7 comments · Fixed by #3816
Assignees
Labels
bug Something isn't working Task

Comments

@davep
Copy link
Contributor

davep commented Nov 22, 2023

This has turned up with Textual 0.42. If you have a widget that is styled scrollbar-gutter: stable, the loading overlay seems to "leak" whatever's underneath on the edge of the indicator. Using this code (using an OptionList as that's the widget I discovered it with):

from textual.app import App, ComposeResult
from textual.widgets import OptionList

class LoadingOverlayRedux(App[None]):

    CSS = """
    OptionList {
        scrollbar-gutter: stable;
        width: 1fr;
        height: 1fr;
    }
    """

    BINDINGS = [
        ("space", "toggle")
    ]

    def compose(self) -> ComposeResult:
        yield OptionList(*[
            ("X" * 500) for _ in range(1_000)
        ])

    def action_toggle(self) -> None:
        self.query_one(OptionList).loading = not self.query_one(OptionList).loading

if __name__ == "__main__":
    LoadingOverlayRedux().run()

it initially looks like this:

Screenshot 2023-11-22 at 19 55 03

and then if I toggle loading:

Screenshot 2023-11-22 at 19 55 13

@davep davep added bug Something isn't working Task labels Nov 22, 2023
davep added a commit to davep/textual-sandbox that referenced this issue Nov 22, 2023
@willmcgugan
Copy link
Collaborator

Fixed now.

Copy link

Don't forget to star the repository!

Follow @textualizeio for Textual updates.

@davep
Copy link
Contributor Author

davep commented Nov 29, 2023

Fixed now.

@willmcgugan Which PR fixed this, as I'm still seeing the exact same problem with 0.43.2 and also main?

@willmcgugan willmcgugan reopened this Nov 29, 2023
@willmcgugan
Copy link
Collaborator

My mistake. It is still there.

@willmcgugan
Copy link
Collaborator

Seems to be more than scroll gutter at play. If you scroll down you don't see the loading indicator. Like its not taking in to account scroll position.

@davep
Copy link
Contributor Author

davep commented Nov 29, 2023

Good spot!

Copy link

github-actions bot commented Dec 6, 2023

Don't forget to star the repository!

Follow @textualizeio for Textual updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Task
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants