Commit Graph

5691 Commits

Author SHA1 Message Date
Dave Pearson
865a8e5e4e Add a docstring to Pretty.update 2023-03-01 12:55:00 +00:00
Dave Pearson
7ca3357cbd Add a docstring for Pretty.render 2023-03-01 12:54:11 +00:00
Dave Pearson
52adf3f58e Add a docstring to Pretty.__init__ 2023-03-01 12:53:12 +00:00
Dave Pearson
75625ef6f3 Add a class docstring for the Pretty widget. 2023-03-01 12:51:26 +00:00
Dave Pearson
9c45c7df89 Add a module docstring for _pretty.py 2023-03-01 12:49:51 +00:00
Dave Pearson
27ebdc4ec3 Add a Makefile target for installing pre-commit hooks
Any time I cause my venv to be rebuilt, I need to remember to do this, and I
always have to search my shell history to remind myself what the command is.
That feels like it deserves to go into the Makefile.
2023-03-01 12:44:51 +00:00
Dave Pearson
4971e0e638 Remove defaults from the Placeholder.__init__ docstring args 2023-03-01 12:41:57 +00:00
Dave Pearson
8f9cf74381 Add a docstring to Placeholder.render 2023-03-01 12:39:33 +00:00
Dave Pearson
46bf55877d Add a docstring to Placeholder.variant 2023-03-01 12:38:47 +00:00
Dave Pearson
d50fcc7479 Add a docstring to PlaceholderVariant 2023-03-01 12:37:56 +00:00
Dave Pearson
bba5017354 Type TextLog.max_lines in a way that works in all Pythons
Well, all *supported* Pythons.
2023-03-01 12:36:32 +00:00
Dave Pearson
5a6145980b Remove unused import 2023-03-01 11:53:07 +00:00
Dave Pearson
a4f22d085b Add a module docstring to _placeholder.py 2023-03-01 11:52:09 +00:00
Dave Pearson
d4ef173525 Remove unnecessary pass 2023-03-01 11:49:15 +00:00
Dave Pearson
a326169b92 Add a docstring to ListItem.highlighted 2023-03-01 11:48:53 +00:00
Dave Pearson
3478615592 Add a class docstring to ListItem 2023-03-01 11:48:13 +00:00
Dave Pearson
43cc67d254 Add a module docstring to _list_item.py 2023-03-01 11:44:36 +00:00
Dave Pearson
11e16b406a Remove unused import in _text_log.py 2023-03-01 11:23:34 +00:00
Dave Pearson
b4da48a893 Merge pull request #1902 from davep/lazy-scrolling
Fixes and improvements relating to scrolling
2023-03-01 11:13:11 +00:00
Dave Pearson
db708bf265 Add typing and a docstring to _lazily_scroll_end 2023-03-01 11:05:15 +00:00
Dave Pearson
42718869f1 Tidy up the TextLog.write docstring 2023-03-01 10:47:32 +00:00
Dave Pearson
8b22875e37 Fix TextLog.__init__ copy/paste-os 2023-03-01 10:45:58 +00:00
Dave Pearson
c0cc080b7c Be explicit about the type of TextLog.max_lines 2023-03-01 10:44:59 +00:00
Dave Pearson
c619984845 Add a docstring to TextLog 2023-03-01 10:44:20 +00:00
Dave Pearson
74526c1902 Add a module docstring to _text_log 2023-03-01 10:42:14 +00:00
Dave Pearson
87f216980d Add the Welcome widget to the documentation
While it's arguably not the most useful widget, it's in the code, exported,
and can be seen by people; I feel it should be in the documentation. I've
ensured that it also links to Placeholder given it sort of is a Placeholder
and so people might arrive at it first and it makes sense to redirect them
to something more comprehensive.
2023-03-01 10:39:30 +00:00
Dave Pearson
ed2d547fcf Add docstrings to the Welcome widget 2023-03-01 10:39:08 +00:00
Dave Pearson
287ef15c24 Add a module docstring for Header 2023-03-01 10:27:12 +00:00
Dave Pearson
61aa558d78 Document Header.tall 2023-03-01 10:26:07 +00:00
Dave Pearson
4258698855 Document all of the Header __init__ arguments 2023-03-01 10:25:26 +00:00
Dave Pearson
766cae2f47 Make Header.show_clock private
Header.show_clock was just a good old plain object attribute, not a
reactive, and also wasn't done as a read-only property. This means someone
could get the impression that it could be modified on the fly and the header
would react.

There might be an argument for turning it into that; but for the moment this
commit makes it private so that nobody gets the wrong impression.
2023-03-01 10:20:47 +00:00
Dave Pearson
b071121af7 Migrate the HeaderTitle.render return type hint to RenderResult 2023-03-01 10:17:06 +00:00
Dave Pearson
4a505e8a6c Add a docstring to HeaderTitle.render 2023-03-01 10:16:31 +00:00
Dave Pearson
d0dedc0fde Add a docsrtring for HeaderTitle.sub_text 2023-03-01 10:13:18 +00:00
Dave Pearson
318e129876 Add a docsrtring for HeaderTitle.text 2023-03-01 10:12:48 +00:00
Dave Pearson
27e1311ee0 Flesh out the HeaderClock.render docstring 2023-03-01 10:12:11 +00:00
Dave Pearson
f96eb93a60 Add missing return type to HeaderClock.render 2023-03-01 10:11:37 +00:00
Dave Pearson
cfb21d0728 Flesh out the HeaderClockSpace.render docstring 2023-03-01 10:11:05 +00:00
Dave Pearson
ac18b00c98 Improve the return type of HeaderClockSpace.render 2023-03-01 10:10:29 +00:00
Dave Pearson
3602dab06c Flesh out the HeaderIcon.render docstring 2023-03-01 10:09:54 +00:00
Dave Pearson
597b46fb11 Add missing return type to HeaderIcon.render 2023-03-01 10:09:11 +00:00
Dave Pearson
fb02fde9dc Add a docstring for HeaderIcon.icon 2023-03-01 10:07:41 +00:00
Dave Pearson
7101010fb0 Merge pull request #1906 from davep/question02-doc-tweak
Highlight that the label acquires an id in the example code
2023-03-01 09:43:05 +00:00
Will McGugan
aa45d38696 Merge pull request #1907 from davep/retcon-dogfood
A warning from the future
2023-03-01 09:39:25 +00:00
Dave Pearson
99d482491b A warning from the future
Add a warning to my first blog post, letting the attentive reader know that
`emit_no_wait` doesn't exist any more, and linking them to what they should
be using if they want to do their own custom messages.
2023-03-01 09:14:27 +00:00
Dave Pearson
f9e7c80256 Highlight that the label acquires an id in the example code
While the code here isn't exactly written as a play-along tutorial, it's
reasonable to expect that some one can and will. This commit has been
written because exactly that situation happened.

The problem here is without the ID on the label the layout will end up
looking very different from that shown in the docs; which will halt the
reader's flow as they try and figure out what they did wrong.

Counterpoint: this is a guide, not a tutorial, so it seemed reasonable to
only highlight the important thing that's changing. Personally I think I'd
argue in favour of highlighting all the changes from question01 to
question02.

Addresses #1905.
2023-03-01 09:05:07 +00:00
Will McGugan
5d6f6a12ed Merge pull request #1903 from davep/doc-coordinate
Add property docstrings to Coordinate
2023-02-28 17:18:37 +00:00
Dave Pearson
e8732c3013 Add property docstrings to Coordinate 2023-02-28 16:33:34 +00:00
Dave Pearson
c5448128e1 Merge pull request #1898 from davep/extend-api-docs-linkage
Increase the coverage of API documentation
2023-02-28 16:18:24 +00:00
Will McGugan
cc8436de18 Merge pull request #1900 from Textualize/composit-region-refactor
Added DEBUG switch, scrollbar_size property, fixed text_log line length
2023-02-28 15:50:11 +00:00