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.
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.
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.
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.
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.
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.
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.
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.
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.
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.