Dave Pearson
2d544ca697
Rename the tuples selection list example to mention tuples
...
Making this one look like it was *the* canonical example wasn't a good idea.
2023-05-25 08:58:45 +01:00
Dave Pearson
a9100988b4
Make a start on the SelectionList example apps
2023-05-24 21:36:14 +01:00
Dave Pearson
3e4291cf94
Remove unnecessary inclusion of Selection
...
It will be included by the nature of selection_list being included.
2023-05-24 15:31:27 +01:00
Dave Pearson
e7876ca001
Merge branch 'main' into multiselect
2023-05-24 15:29:37 +01:00
Dave Pearson
fb82564858
Merge pull request #2643 from davep/include-more-option-stuff-in-docs
...
Include more missing things from the OptionList
2023-05-24 15:28:52 +01:00
Dave Pearson
09c6ea9911
Include more missing things from the OptionList
...
While working on the SelectionList documentation I've noticed that even more
things have got lost from the docs relating to OptionList, likely lost when
widgets were removed from the API section of the docs.
This drags more OptionList-related types into the docs, thus providing more
links.
2023-05-24 15:21:41 +01:00
Dave Pearson
49c7b20bc1
Link mention of Strip in a docstring
2023-05-24 15:19:02 +01:00
Dave Pearson
71d7f7dd86
Merge branch 'main' into multiselect
2023-05-24 15:08:04 +01:00
Dave Pearson
910c4782f1
Add the main framework for the OptionList documentation
...
Lots to flesh out here still, but this gets the core framework in place.
2023-05-24 15:05:10 +01:00
Dave Pearson
113ab41c3b
Some more linking to types within the SelectionList docstrings
2023-05-24 14:58:27 +01:00
Dave Pearson
ac7a892965
Link most(all?) docstring mentions of SelectionList
...
Putting the hype in hypertext.
2023-05-24 14:41:11 +01:00
Dave Pearson
9c0df44b59
Supply the generic type when creating a Selection
...
I don't think this is *needed* as such, but it seems like the sensible thing
to do.
2023-05-24 14:35:13 +01:00
Dave Pearson
a32cfdbe40
Better linking for the docstring for MessageSelectionType
2023-05-24 14:32:32 +01:00
Dave Pearson
64dd7d0f17
Better linking for the docstring for SelectionType
2023-05-24 14:31:50 +01:00
Dave Pearson
78980670da
Merge pull request #2640 from davep/include-option-in-docs
...
Include `widgets.option_list.Option` in the docs
2023-05-24 14:31:27 +01:00
Dave Pearson
2874b24a87
Export genetic types for SelectionList
...
So these can end up in the docs.
2023-05-24 14:30:15 +01:00
Dave Pearson
7c9b3f4cd6
Include widgets.option_list.Option in the docs
...
Noticed this in passing; possibly dropped by accident when the widgets were
removed form the API section of the docs?
2023-05-24 14:13:17 +01:00
Dave Pearson
258181d1de
Flesh out the docstring for the selected property
2023-05-24 14:04:53 +01:00
Dave Pearson
a31c3f0774
Correct the Selection.__init__ docstring
2023-05-24 14:03:09 +01:00
Dave Pearson
9742144e8c
Remove a note that isn't relevant any more
2023-05-24 13:00:20 +01:00
Dave Pearson
2e37541d70
Correct the types in a copied docstring
2023-05-24 12:59:20 +01:00
Dave Pearson
64ed982fd4
Make it very clear when SelectedChanged is posted
2023-05-24 12:57:13 +01:00
Dave Pearson
b113663221
Add a note about SelctionToggled vs SelectedChanged
2023-05-24 12:55:31 +01:00
Dave Pearson
65375e88b6
Remove an outdated note
2023-05-24 12:39:33 +01:00
Dave Pearson
9459a4efd7
Merge pull request #2636 from davep/select-reactive-table-fix
2023-05-24 10:52:29 +01:00
Dave Pearson
ed0aa78f22
Merge pull request #2637 from davep/option-list-docs-typo-fix
2023-05-24 10:47:25 +01:00
Dave Pearson
7f3efcf6ed
Fix a typo in the OptionList messages list
2023-05-24 10:41:55 +01:00
Dave Pearson
7d635915fa
Fix Select reactives table layout
...
The escaped | wasn't being rendered correctly as it was inside back-ticks.
2023-05-24 10:31:34 +01:00
Dave Pearson
cb05cfff53
Test that the control of selection list events is always correct
2023-05-24 10:21:40 +01:00
Dave Pearson
0a63748573
Add a test for later addition of selected selections
2023-05-24 10:16:25 +01:00
Dave Pearson
7110b30b44
Make sure adding a selection later updates selected
2023-05-24 10:16:06 +01:00
Dave Pearson
d3fe23f0bc
Allow passing a Selection into a SelctionList
...
Up until now I've only been allowing tuples; mostly a hangover from the
initial take on this. Things have drifted a bit now and I feel it makes
sense to allow Selection instances in too.
2023-05-24 10:09:53 +01:00
Dave Pearson
da1faf8fb9
Allow for storing the initial state of a selection
2023-05-24 10:09:21 +01:00
Dave Pearson
2e540548f8
Add a test that removed selected selections are removed from selected
2023-05-24 09:19:56 +01:00
Dave Pearson
9d6e977e0e
Test messages when toggling a selection via user input
2023-05-24 09:15:43 +01:00
Dave Pearson
56103c52e7
Ensure we log any OptionList messages in the messages test
...
We don't actually want to see them, we don't expect to see them, so here I
make a point of logging them so we can be sure we *don't* see them.
2023-05-24 09:09:40 +01:00
Dave Pearson
50d77b231f
Add tests for the wrong sized tuple
...
While type checking picks this up, not everyone uses type checking.
2023-05-23 16:45:53 +01:00
Dave Pearson
9f6d35b871
Start unit tests for the actual selected property
2023-05-23 16:26:28 +01:00
Dave Pearson
c448fa1ea0
Add unit tests for selection list messages
2023-05-23 15:48:34 +01:00
Dave Pearson
f9780d0346
Add basic selection list creation unit tests
2023-05-23 15:13:46 +01:00
Dave Pearson
d38780ba97
Ensure we don't try and post messages before the widget is ready
2023-05-23 11:45:31 +01:00
Dave Pearson
d5799377a2
Document _selected
...
It's not for public consumption, but it's useful for anyone reading the code.
2023-05-23 11:31:07 +01:00
Dave Pearson
bee438bc53
Get the selection value tracker in place before calling the superclass
2023-05-23 11:30:04 +01:00
Dave Pearson
fefb33a23b
Add a docstring to the internal copy of the selection value
2023-05-23 11:07:45 +01:00
Dave Pearson
81abac1c68
Tidy up some docstrings
...
Mainly adding missing return values, that sort of thing.
2023-05-23 10:46:00 +01:00
Dave Pearson
23d899935f
Correct a docstring
2023-05-23 10:36:59 +01:00
Dave Pearson
ff404e2bbf
Only refresh on deselect if something was deselected
2023-05-23 10:35:48 +01:00
Dave Pearson
d861cced97
Improve how the _all methods work
...
Deciding if there was a change when turning all on or off by looking at the
before an after counts was fine, but it's not a sensible way of seeing if
there was a change during a toggle. So this swaps things up a bit and has
the core selection changing methods return a flag to say if they actually
made a change or not.
2023-05-23 10:33:39 +01:00
Dave Pearson
db273ea9ff
Add a method for toggling all options
2023-05-23 10:26:16 +01:00
Dave Pearson
a4148d028b
Add a method for deselecting all options
2023-05-23 10:22:01 +01:00