-
Notifications
You must be signed in to change notification settings - Fork 815
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
Fixed a bug with flickering if scrollbar size is set to 0. #4460
Conversation
Now setting scrollbar-size to 0 will work and won't flicker
fix typo: vertival updated to vertical
That may very well be the right fix! |
why does it say |
You should be able to click "Details" to see what failed. The formatting check failed. That's easily fixed by installing and running And a test failed. This could mean your change broken something else. You can run the tests locally with |
Thanks a lot! And when I format it and fix the errors it is causing in testing - do I create a new pull request and close this one? |
No, just make changes, and push. That will make the tests run again... |
Do you have an MRE (short example) that shows the issue? I can't reproduce it with the following code: from textual.app import App, ComposeResult
from textual.widgets import Static
class SApp(App):
CSS = """
Screen {
scrollbar-size-vertical: 0;
}
"""
def compose(self) -> ComposeResult:
yield Static("\n".join(str(n)*20 for n in range(100)))
if __name__ == "__main__":
app = SApp()
app.run() |
The following code reproduces the issue for me.
However I gave up trying to fix the "issues" that occur during the automatic tests. That is because I git cloned the official repository, run all of the setup commands and downloaded everything necessary as stated in the CONTRIBUTING.md file. Then I ran the tests using I might have done something wrong during setup but I have double checked and followed CONTRIBUTING.md closely. It is more then likely I think that I did something wrong during setup or during running the tests because it can't be that a repository that automatically checks every pull request using automated tests has content that fails those tests. If you know why I got the errors when I ran the tests on the unchanged official repository than please let me know. If you feel like you want to contribute to this project and maybe fix the issues you are welcome. If not, I will close this pull request and report the bug and the protentional fix that I found. Also thanks for all of the help that you gave me. I am new and it really helped me out a lot. It's just that I got errors even from the unchanged repository when running tests that deterred me. Even then it's still a great and a new experience contributing to open source. |
By "errors" do you mean that some of tests failed?
I can't reproduce the issue you're describing with this code. What version of textual are you using? |
I am using python 3.11.1 and Textual 0.40.0. I now realized I was in fact running an outdated version of textual. I updated to 0.58.1. I thought I had the latest version. When I updated the issue disappeared.
Yes. I forgot the word I ran the tests again and got: (I removed all of those extra equals signs.)
Only one test failed, which is weird. I swear it was at least 3 test before. Also I am sorry for not checking my Textual version before making a pull request. At least it won't happen again... probably. |
This is why it is best practice to create an issue first with an MRE (short example) before making a pull request. Especially as the issue template would have prompted you for the version you're running. I don't want to discourage you from contributing to open source, but you should at least run the tests locally to ensure your changes haven't broken anything before submitting a PR. Thanks for providing the failure info, this might be something where Windows hasn't been taken into account. |
Basically in the textual website - https://textual.textualize.io/styles/scrollbar_size/ there is:
But when I tried it it would just flicker or not show up at all. Now if you want to hide a scrollbar you can use any of these:
It was a small change. Just a single line of code. I don't understand what exactly the change I made did but with trial and error I managed to fix it without knowing the internals of textual. I am pretty sure I didn't break anything since it is just a small change. I tested it with a small application and it worked so it should be good to go.
(If I did something wrong please tell me this is my first time contributing to a project. I am open to learn)