Commit Graph

5707 Commits

Author SHA1 Message Date
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
Will McGugan
129a4fe386 superfluous docstring 2023-02-28 15:43:23 +00:00
Will McGugan
9ccff28e9f clarification in docstring 2023-02-28 15:38:36 +00:00
Dave Pearson
f7849bd32d Reformat for black
Nuked and recloned my repo earlier and forgot to set up pre-commit again.
2023-02-28 15:33:27 +00:00
Will McGugan
5af39325e5 Removed unused symbol 2023-02-28 15:07:29 +00:00
Dave Pearson
37208b199c Fixes and improvements relating to scrolling
The changes here roll two issues into one change. With this commit:

- Scrolling up/down/etc using the keyboard now moves just one cell, rather
  than moving the number of cells specified by the scroll sensitivity that's
  intended for pointing devices. #1897
- Where appropriate the scrolling is done lazily; that is it is done after
  the next refresh, helping to ensure that the scroll will take into account
  any updates in the same parent call. #1774
2023-02-28 14:59:46 +00:00
Will McGugan
e336ac2689 sort order 2023-02-28 13:47:45 +00:00
Will McGugan
dec2a3b5b0 fix typing 2023-02-28 13:47:11 +00:00
Will McGugan
6f8d0ce076 Added apply_style to Strip 2023-02-28 13:41:46 +00:00
Will McGugan
50efb878ae Merge pull request #1899 from davep/tidy-binding-docstring
Simplify Bindings.shown_keys docstring
2023-02-28 13:26:49 +00:00
Dave Pearson
c30c09adc3 Simplify Bindings.shown_keys docstring
In the public interface it's a property, not a method, so it doesn't need a
'Returns'.
2023-02-28 13:06:09 +00:00
Dave Pearson
ce5b02522e Document AwaitRemove 2023-02-28 12:50:41 +00:00
Dave Pearson
8d2336a02e Increase the coverage of API documentation
See #1364 -- rather than pull in specific classes, this pulls in every
publicly-documented item (function, class, type, "constant", etc) that can
be found in each of the modules.

This should help improve the linkage of types within the documentation.
2023-02-28 12:27:22 +00:00
Will McGugan
7e7d24d880 Added DEBUG switch, scrollbar_size property, fixed text_log line length 2023-02-28 08:54:39 +00:00
Will McGugan
80ae6ce4d9 Update task.md 2023-02-27 16:19:31 +00:00
Dave Pearson
0ee5323653 Merge pull request #1893 from davep/more-action-docs
Add a docstring to Input.action_submit
2023-02-27 16:09:16 +00:00
Dave Pearson
eb2b3fa4ea Add a docstring to Input.action_submit 2023-02-27 15:23:07 +00:00
Dave Pearson
9f77208fef Merge pull request #1872 from davep/toggle-boxen
Add `Checkbox`, `RadioButton` and `RadioSet`
2023-02-27 15:15:51 +00:00
Dave Pearson
df6f7bd8da Don't bubble up any Changed event when stopping all-off on radio set 2023-02-27 14:03:54 +00:00
Dave Pearson
d8ae11d646 Drop a vestigial cast 2023-02-27 13:53:09 +00:00
Dave Pearson
201ab4eb72 Move RadioSet.Changed near the top of the class
As requested in https://github.com/Textualize/textual/pull/1872#discussion_r1118627015

Personally my preference tends to run to having inner-classes defined close
to where they're used, but I can't think of a good reason not to do it this
way either.
2023-02-27 13:46:52 +00:00
Dave Pearson
47eb9f0064 Typo fix 2023-02-27 13:45:43 +00:00
Dave Pearson
dec9a77304 Fix a docstring typo
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2023-02-27 13:35:54 +00:00
Dave Pearson
b5c028c36d Fix a docstring typo
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2023-02-27 13:35:33 +00:00
Dave Pearson
9b6f1c4dcf Merge pull request #1890 from davep/tidy-tree-docstrings
Remove types from various docstrings in _tree.py
2023-02-27 12:28:50 +00:00
Dave Pearson
1198a4eaef Remove types from various docstrings in _tree.py 2023-02-27 11:32:24 +00:00
Dave Pearson
8c5fb38851 Merge branch 'main' into toggle-boxen 2023-02-27 10:31:06 +00:00
darrenburns
cbe2ab87c6 Datatable labelling rows (#1868)
* Renaming some component classes in DataTable

* Some more renaming of DataTable component classes

* Separate styling for fixed rows/columns from labels

* Highlight fixed rows/cols affected by colour differently

* Tweaking styles for fixed data in DataTable

* Update DataTable snapshots

* Add row label to Row metadata

* Wiring up some labelled row logic behind flags

* Renaming variable in DataTable

* Variable renaming in DataTable

* [no ci] Labelling rows progress

* Add RenderedRow abstraction to DataTable

* Computing label widths

* Use the Column object to represent row label column

* Ability to toggle row labels reactively

* Adjust width calculation for label widths

* Add DataTable.RowLabelSelected

* Posting the RowLabelClick message

* Hovering of row labels applies new style

* Remove a print

* Ensure horizontal scrolling with column cursor accounts for row label column

* Account for possible row labels in cell cursor horizontal scrolling

* Ensure cursor highlighting is correct on row label cells

* Document component class for DataTable label hover

* Test to ensure clicking row label emits correct event

* Add snapshot test for DataTable with fixed rows/cols and row labels

* Using pilot pause instead of wait_for_idle directly

* Update CHANGELOG

* Add a docstring

* Add a note to CHANGELOG.md about RowLabelSelected
2023-02-27 10:29:17 +00:00
Dave Pearson
7bfed019c9 Improve the wording of a test description 2023-02-27 10:08:45 +00:00
Dave Pearson
445e29ff26 Improve the wording of a test description 2023-02-27 10:07:59 +00:00
Dave Pearson
db9b9e1c5d Fix a typo 2023-02-27 10:07:25 +00:00
Dave Pearson
7f90e4e850 Add a test for adding multiple on buttons to a radioset 2023-02-27 10:06:50 +00:00
Dave Pearson
17bc19e5d3 Ensure multiple buttons can't be on on startup 2023-02-27 09:27:46 +00:00
Dave Pearson
6d0fc0489f Rework the layout of the checkbox example
Time to start to show off the new compose method.
2023-02-27 09:11:18 +00:00
Dave Pearson
23c0587efb Rework the layout of the radio button example
Time to start to show off the new compose method.
2023-02-27 09:10:10 +00:00