Commit Graph

5407 Commits

Author SHA1 Message Date
Will McGugan
0894881950 simplify 2023-02-23 21:18:30 +00:00
Will McGugan
9579b9fd24 prevent API refinement 2023-02-23 21:15:05 +00:00
Dave Pearson
236266248d Add CSS class tests for check boxes and radio buttons 2023-02-23 21:10:21 +00:00
Dave Pearson
7c6522e634 Add initial radio button tests 2023-02-23 21:07:39 +00:00
Will McGugan
2f104a5db4 pass prevented messages types in post 2023-02-23 17:41:13 +00:00
Dave Pearson
cfe7be3abe Some initial Checkbox unit testing
Lots more to come.
2023-02-23 16:46:58 +00:00
Dave Pearson
05208567ee Prevent the initial Changed event when initial value is True 2023-02-23 16:45:35 +00:00
Dave Pearson
837d56f47f Provide a default label for the toggle buttons
If one isn't provided it'll be an empty string.
2023-02-23 16:09:24 +00:00
Will McGugan
fd13b33cce prevent message stack 2023-02-23 16:05:11 +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
Will McGugan
ba30e0dd66 set prevent 2023-02-23 15:34:02 +00:00
Dave Pearson
316faf9e45 Add width reference documentation for radio set 2023-02-23 15:31:32 +00:00
Will McGugan
c2ea074f4a fix name 2023-02-23 15:28:11 +00:00
Will McGugan
fd9ce05305 prevent messages stack 2023-02-23 15:26:41 +00:00
Will McGugan
0f1251d0bf pass prevent to messages 2023-02-23 15:22:40 +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
Will McGugan
4cf7492a28 docstrings 2023-02-23 13:53:36 +00:00
Dave Pearson
66af586d0e Add a missing 2023-02-23 13:52:22 +00:00
Will McGugan
f723f3771f changelog 2023-02-23 13:51:34 +00:00
Will McGugan
7d99d168ff prevent implementation 2023-02-23 13:49:07 +00:00
Dave Pearson
6233ae3377 Extend and improve the RadioSet docstrings 2023-02-23 13:39:48 +00:00
Dave Pearson
652d449643 Type-tidy the radio set button query 2023-02-23 13:34:08 +00:00
Dave Pearson
affb3b696f Type-tidy the radio set event handling 2023-02-23 13:32:17 +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
99341a9cd4 Rename the file that holds ToggleButton
This makes it more in keeping with other widgets, despite the fact that it
should be considered to be an internal widget.
2023-02-23 12:29:50 +00:00
Dave Pearson
1c05f79f3c Add some default styling to a radio set 2023-02-23 10:54:28 +00:00
Dave Pearson
af3c5f15c6 Ensure that toggle buttons are width auto 2023-02-23 10:54:09 +00:00
Dave Pearson
ceade8a242 Ensure we're only working with the first line of the label 2023-02-23 10:17:18 +00:00
Dave Pearson
73cb4c5ec2 Turn off wrapping and add ellipsis to the overall widget 2023-02-23 10:13:08 +00:00
Dave Pearson
46018c3d40 Add missing import 2023-02-23 10:11:57 +00:00
Dave Pearson
2fbb64c27f Add methods for getting the width and height of the widget 2023-02-23 10:09:03 +00:00
Dave Pearson
a32a9fa6af Reduce the calls to Text when building the button
Found out that Text.assemble can take a collection of tuple of text and
style, which makes things a lot easier and needs less object construction.
2023-02-23 10:06:13 +00:00
Dave Pearson
177aae6902 Don't force a radio set to have at least one button on on start
It felt like the right thing to do, but it shouldn't be necessary. There are
times where someone may actually want to have a radio set with no buttons
pushed to start with.
2023-02-22 21:07:08 +00:00
Dave Pearson
789e0511d2 Don't react on initial set 2023-02-22 21:06:47 +00:00
Dave Pearson
1b2f5a15a3 Stop wrapping the spacer as Text
It's not needed. It has no style of its own. It's just a space.
2023-02-22 21:01:03 +00:00
Dave Pearson
91199fd6e9 Make the label available but read-only
This was originally going to be something that could be modified on the fly,
but it's been requested that this not be the case. So here I'm making the
actual label an internal and providing read-only access to it.
2023-02-22 20:55:20 +00:00
Dave Pearson
9dd66fcdcb Tidy some documentation in the base toggle box class 2023-02-22 20:45:34 +00:00
Dave Pearson
e3cbaa8dca Merge pull request #1862 from davep/textlog-docstring
Textlog docstring
2023-02-22 16:56:38 +00:00
Will McGugan
bf91805f1d Merge pull request #1861 from Textualize/fix-text-log-refresh
Fix text log refreshing
2023-02-22 16:48:31 +00:00
Dave Pearson
d854cb81af Add some reactive attribute docstrings to TextLog
A contribution to #1811.
2023-02-22 16:35:31 +00:00
Will McGugan
40de64773e superfluous refresh 2023-02-22 16:33:48 +00:00