Commit graph

1021 commits

Author SHA1 Message Date
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
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
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
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
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
Dave Pearson
f436489efa
Rework the layout of the radio set example
Time to start to show off the new compose method.
2023-02-27 09:08:40 +00:00
Dave Pearson
e6e46d0825
Merge branch 'main' into toggle-boxen 2023-02-27 08:53:30 +00:00
Will McGugan
5b1cba1d85 update to copy 2023-02-26 12:31:50 +00:00
Will McGugan
bc620fd46f remove highlighted line 2023-02-26 12:24:39 +00:00
Will McGugan
da1a820565 highlight lines 2023-02-26 12:08:18 +00:00
Will McGugan
b23fbd9be8 words 2023-02-26 10:36:17 +00:00
Will McGugan
9c1f6f7fad Added docs for the new compose method 2023-02-26 10:34:30 +00:00
Will McGugan
461abc7fbe missing bracket 2023-02-24 17:19:55 +00:00
Will McGugan
01a4ed97e1 update blog 2023-02-24 17:12:29 +00:00
Will McGugan
e3976155fd
Update docs/blog/posts/release0-12-0.md
Co-authored-by: Dave Pearson <davep@davep.org>
2023-02-24 17:12:14 +00:00
Will McGugan
8a5e5f29e0
Update docs/blog/posts/release0-12-0.md
Co-authored-by: Dave Pearson <davep@davep.org>
2023-02-24 17:12:04 +00:00
Will McGugan
661990f6e4 new blog post 2023-02-24 17:01:02 +00:00
Will McGugan
5f1ca95f8a
Merge pull request #1866 from Textualize/prevent-event
Add a "prevent" context manager
2023-02-24 12:36:46 +00:00
Will McGugan
63438f170d
Update docs/examples/events/prevent.py
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2023-02-24 12:02:56 +00:00
Will McGugan
217956bbdf
Update docs/examples/events/prevent.py
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2023-02-24 12:02:46 +00:00
Will McGugan
0999114811
Update docs/guide/events.md
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2023-02-24 12:02:20 +00:00
Dave Pearson
f0a6771533
Update the ChangeLog and the roadmap 2023-02-23 22:14:41 +00:00
Will McGugan
b2ab5b6886 docs 2023-02-23 21:36:33 +00:00
Dave Pearson
307b1789a1
Give radio button its own example code now
Still within a RadioSet, but this time only the code that uses RadioSet; not
the code that just uses strings.
2023-02-23 16:00:14 +00:00
Dave Pearson
316faf9e45
Add width reference documentation for radio set 2023-02-23 15:31:32 +00:00
Dave Pearson
a821b2f8f6
Add width reference documentation for radio buttons
A large part of the code to go with this is to show off a radio set; I feel
it makes sense to use the same code for both bits of documentation given
that a radio button only really makes sense inside a radio set.
2023-02-23 15:14:25 +00:00
Dave Pearson
a3d50d90f6
Revert example code to composing the old way
We've not documented it yet so, until we do...
2023-02-23 15:09:45 +00:00
Dave Pearson
87bd610eec
Swap the checkbox example to the newer compose approach 2023-02-23 14:45:24 +00:00
Will McGugan
da9e28d4d6 Add example 2023-02-23 14:41:44 +00:00
Will McGugan
dc4421e76a
Merge pull request #1867 from davep/fix-switch-wording
Correct the wording of the description of `Switch.value`
2023-02-23 14:41:08 +00:00
Dave Pearson
01215a1fe8
Tweak the style of the box in the example for checkbox 2023-02-23 14:40:58 +00:00
Will McGugan
2ee61f95db Docs 2023-02-23 14:37:47 +00:00
Dave Pearson
4f75a395d8
Fix copy/paste-o in the checkbox reference 2023-02-23 14:35:24 +00:00
Dave Pearson
6738c5686c
Correct the wording of the description of Switch.value
It's not just the default value, it's the ongoing value too and can be used
to change the switch.
2023-02-23 14:28:25 +00:00
Dave Pearson
3fd3d272ce
Add the widget reference for Checkbox 2023-02-23 14:26:11 +00:00
Dave Pearson
f52aac4952
Initial work on adding toggle buttons to the documentation
This just gets the API docs into place, and tidies up some of the docstirngs.
2023-02-23 13:27:27 +00:00
Dave Pearson
a18685c9c8
Fix a copy/paste-o in the TextLog reference entry 2023-02-22 16:28:23 +00:00
Will McGugan
068d7513b8
Merge pull request #1823 from Textualize/optimize-scroll
Optimize scroll with a Spatial Map
2023-02-21 10:41:04 +00:00
Will McGugan
453070032e
Merge pull request #1785 from davep/promote-disabled
Promote disabled to `Widget` level
2023-02-21 09:56:01 +00:00
Will McGugan
32a1b576a0 merged changelog 2023-02-17 12:37:53 +00:00
Will McGugan
11d10db1ab fast path for scrolling 2023-02-17 10:42:42 +00:00
Dave Pearson
c4b24babc8
Mark the Markdown viewer as done on the roadmap
Also add a couple of sub-items that are tended to be added.
2023-02-17 10:13:17 +00:00
Dave Pearson
ca1eede533
Merge branch 'main' into promote-disabled 2023-02-15 13:59:32 +00:00
Will McGugan
56b0214c6b fix blog 2023-02-15 11:55:41 +00:00
Will McGugan
0dc6235042 update title 2023-02-15 11:53:00 +00:00
Dave Pearson
911582d89b
Merge branch 'main' into promote-disabled 2023-02-15 11:47:11 +00:00
Will McGugan
91fe34465c Wording 2023-02-15 11:25:57 +00:00
Will McGugan
6531901442 Added tip to post 2023-02-15 11:22:43 +00:00
Will McGugan
cee21cf87c version bump, post, added --screenshot options to console run 2023-02-15 11:05:45 +00:00
Dave Pearson
6ab9a424a2
Merge branch 'main' into promote-disabled 2023-02-15 10:14:21 +00:00
Will McGugan
0dac83668b
Merge pull request #1791 from Textualize/textual-markdown
Textual markdown
2023-02-15 09:23:19 +00:00
Dave Pearson
ba9b2e03d9
Merge branch 'main' into promote-disabled 2023-02-15 08:47:20 +00:00
Will McGugan
08c3a7214e No, I repeat, no abbreviations 2023-02-14 17:28:24 +00:00
Will McGugan
df1edb087c
Merge pull request #1788 from Textualize/datatable-select-headers
DataTable - Message emitted when header selected
2023-02-14 16:42:01 +00:00
Darren Burns
36a9214d7f
Update reactive names in DataTable reference docs 2023-02-14 15:29:05 +00:00
Will McGugan
71d0017ef9 docs and refactor 2023-02-14 15:22:15 +00:00
Darren Burns
49b78daa04
Update docs to include DataTable.HeaderSelected 2023-02-14 15:18:32 +00:00
Dave Pearson
bff4334c5a
Merge branch 'main' into promote-disabled 2023-02-14 10:31:36 +00:00
darrenburns
27503b15bf
Merge branch 'main' into datatable-cell-keys 2023-02-14 10:27:24 +00:00
Will McGugan
6f1abe849f fix reference 2023-02-13 17:30:53 +00:00
darrenburns
bd73b1b007
Merge branch 'main' into datatable-cell-keys 2023-02-13 16:02:37 +00:00
Dave Pearson
257fe7b30a
Add enabled and disabled pseudo-classes
Note that this doesn't touch the application of stylesheets yet, in terms of
things like specificity; this just makes sure that the classes exist and can
be seen.
2023-02-13 12:56:52 +00:00
Will McGugan
555cf8e6ee comma 2023-02-13 09:29:04 +00:00
Will McGugan
933138b3a6 fix link 2023-02-11 20:15:23 +00:00
Will McGugan
a28c970506 Wrong link 2023-02-11 17:41:48 +00:00
Will McGugan
48a4c7cb68 reverse words 2023-02-11 17:25:22 +00:00
Will McGugan
e880f27329 no comma 2023-02-11 17:21:47 +00:00
Will McGugan
93746b75a1 edit 2023-02-11 17:20:08 +00:00
Will McGugan
6004d7c731 typo 2023-02-11 17:16:01 +00:00
Will McGugan
1540f120cc words, non draft 2023-02-11 17:15:35 +00:00
Will McGugan
05042725cd words 2023-02-11 17:11:38 +00:00
Will McGugan
f5723f933e new blogpost 2023-02-11 17:08:21 +00:00
Will McGugan
a37e7fcb2b fix modal example 2023-02-11 15:37:24 +00:00
Dave Pearson
0b9107abfc
Merge branch 'main' into switch-redux 2023-02-09 16:09:56 +00:00
Darren Burns
f4cd51e5e8
Merge branch 'main' of github.com:Textualize/textual into datatable-cell-keys 2023-02-09 15:55:45 +00:00
Dave Pearson
584df4530c
Merge branch 'main' into package-docs 2023-02-09 15:49:56 +00:00
Dave Pearson
1956f7f9d7
Rename the switch--switch component class to switch--slider
Following on from #1751: originally Switch was called Checkbox and the
moving part was, for the component class, called a checkbox--switch; after
renaming the widget to Switch that component class ended up being
switch--switch; which wasn't ideal.

We decided to go with it as-is, but I just realised that internally the code
calls it a slider. So this leans into that and I'm renaming the component
class switch--slider. This removes the doubling-up of the name and also
makes the code more consistent.
2023-02-09 15:36:04 +00:00
Dave Pearson
decc1e2f3c
Rename Checkbox to Switch
A new form of Checkbox will be arriving in Textual soon, working in
conjunction with a RadioButton. What was called Checkbox is perhaps a wee
bit heavyweight in terms of visual design, but is a style of widget that
should remain.

With this in mind we're renaming the current Checkbox to Switch. In all
other respects its workings remains the same, only the name has changed.

Things for people to watch out for:

- Imports will need to be updated.
- Queries will need to be updated; special attention will need to be paid to
  any queries that are string-based.
- CSS will need to be changed if any Checkbox styling is happening, or if
  any Checkbox component styles are being used.

See #1725 as the initial motivation and #1746 as the issue for this
particular change.
2023-02-09 11:10:30 +00:00
Darren Burns
c9398d87cf Merge branch 'main' of github.com:willmcgugan/textual into datatable-cell-keys 2023-02-08 14:22:43 +00:00
Dave Pearson
8d905b753d
Revert retrofitting of example code in an old blog post
Makes sense to update all the docs to reflect the work done in #1738 but I
feel it doesn't quite make sense to retrofit this into an old blog post --
especially if the code it is referring to was like that at the time and
likely still will be for a wee while after this gets republished.
2023-02-08 13:39:24 +00:00
Darren Burns
20b8782a5d Unit tests for DataTable reverse sort 2023-02-08 12:54:15 +00:00
Dave Pearson
ddb2579168
Merge branch 'main' into package-docs 2023-02-08 11:40:15 +00:00
Will McGugan
1b050ea8b7
Merge pull request #1738 from Textualize/emit-start-with-self
Change emit to post to self.
2023-02-08 11:37:43 +00:00
Rodrigo Girão Serrão
c39b23f78d Final fixes. 2023-02-08 11:26:27 +00:00
Rodrigo Girão Serrão
e5e7c08afe Update docs accordingly. 2023-02-08 10:53:51 +00:00
Dave Pearson
86e1997b30
Merge branch 'main' into package-docs 2023-02-08 10:40:20 +00:00
Darren Burns
0721d7fc87 Snapshot test for sorting 2023-02-08 10:39:04 +00:00
Will McGugan
29875a66fc into [skip ci] 2023-02-08 10:31:35 +00:00
Will McGugan
aabc1cc898 fix typo [skip ci] 2023-02-08 10:20:47 +00:00
Will McGugan
0a4d1c919d updated widgets docs 2023-02-07 18:10:01 +00:00
Darren Burns
802ea63ddb
Default cell formatter fixes 2023-02-07 15:09:21 +00:00
Dave Pearson
aece00e1dc
Remove the keystrokes from the dictionary example in events guide
As well as not being necessary for the example, it also had the problem of
not actually having the input in focus (there was no press of 'tab' to kick
things off) and so the other keys didn't go into the `Input` as they were
supposed to.
2023-02-06 16:06:50 +00:00
Dave Pearson
4e4353b2ce
Remove the dictionary example from the front page of the docs
Sometimes, when building the docs, this would end up being a bit of an
"empty" example in that the time taken to get the result back from the API
would be so long that the output would be of the request just in progress.

So we've decided to drop this from the front page.
2023-02-06 16:04:52 +00:00
Will McGugan
fb7fd14262
Merge pull request #1710 from Textualize/line-api-docs
Documented the Line API
2023-02-06 11:42:57 +00:00
Will McGugan
f8577f79d7 review fixes 2023-02-06 11:34:37 +00:00
Will McGugan
b12c5e1cdf typo 2023-02-05 12:12:27 +01:00
Will McGugan
738837fd66 review update 2023-02-05 12:06:48 +01:00