-
Notifications
You must be signed in to change notification settings - Fork 814
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
Clarify docs about creating custom widgets #4018
Comments
(Hey Tom, where's the compound widget that inherits from I do wonder if we should extract parts of this guide into a new guide that should be named something like “Custom widgets” or “Creating a widget”.
Then the guide could explain these three methods. The other sections like the tooltips, border title and subtitle, content size, text links, etc, could be left in this guide. |
Do you mean in the tutorial? textual/docs/examples/tutorial/stopwatch02.py Lines 10 to 18 in 95f0c39
I think what might be confusing some people is that |
I thought you were talking about the guide itself. Yeah, there's plenty of |
Ah no, sorry to "confound this confusion" (clearly my brain wasn't fully engaged when I wrote that!) |
I misinterpreted that part, sorry. Well, the guide could probably be broken up and cleaned up because it has been edited and grown over the past releases and it hasn't grown to be the most usable guide ever. |
Went here trying to understand how to create "Containers", and only few days using/enjoing What is very confusing for me as a nubiee. https://textual.textualize.io/tutorial/ class Stopwatch(Static): via When I go to check manual for
So can I use |
I agree that the documentation is currently a bit confusing on this topic. Perhaps the Textual maintainers could weigh in here, but I really don't think Of course it depends on your application, but it is probably better to use |
The guide to widgets in the docs starts with how to create custom widgets, but compound widgets aren't explained until much later.
I think custom widgets are far more likely to be compound widgets rather than basic renderables. so the order these concepts are introduced is confusing. I wonder if this is partly explains the questions about the difference between render and compose, and also why we see so many compound widgets inherited from
Static
!The tutorial also uses
Static
for a compound widget, which confounds this confusion.The text was updated successfully, but these errors were encountered: