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

Look at adding explicit import details to the API documentation #1773

Closed
davep opened this issue Feb 12, 2023 · 5 comments
Closed

Look at adding explicit import details to the API documentation #1773

davep opened this issue Feb 12, 2023 · 5 comments
Labels
documentation Improvements or additions to documentation Task

Comments

@davep
Copy link
Contributor

davep commented Feb 12, 2023

Consider this question on Discord. In the API documentation it's not entirely clear where various functions and classes should be imported from. A hint can be gathered from the URL, but it should be a clear item of information in the API page itself.

@barisione
Copy link

I think there's another issue here. Most other widgets can be used via from textual import widgets and widgets.SomeWidget. The exceptions I found after having a very quick look are Tabs, Tab and ScrollView. What do you think?

@davep
Copy link
Contributor Author

davep commented Feb 13, 2023

Tabs and Tab aren't supported widgets of Textual (they're a hangover from an older version and need some attention). ScrollView is more of a specialised container (so, if anything, would make more sense being imported from textual.containers).

But, no matter where these land (and that could be another question to ask or issue to raise at some point), I feel we should address the point of this issue so there's never any confusion about where a class in Textual should be imported from (see also events, bindings, screens, etc...).

@davep davep added documentation Improvements or additions to documentation Task labels Feb 13, 2023
@nmay231
Copy link
Contributor

nmay231 commented Jul 5, 2023

Link #2832

@willmcgugan
Copy link
Collaborator

Closing. I don't think this is relevant now.

Copy link

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
documentation Improvements or additions to documentation Task
Projects
None yet
Development

No branches or pull requests

4 participants