Select widget (#2501)

* overlay rule

* select WIP

* select control, made binding description optional

* changelog

* style tweak

* Added constrain

* changelog

* test fix

* drop markup, tidy

* tidy

* select namespace

* tests

* docs

* Added changed event

* changelog

* expanded

* tests and snapshits

* examples and docs

* simplify

* update reactive attributes

* type fix

* docstrings

* allow renderables

* superfluous init

* typing fix

* optimization

* revert optimizations

* fixed words

* changelog

* docstrings

* don't need this

* changelog

* comment

* Update docs/widgets/select.md

Co-authored-by: Dave Pearson <davep@davep.org>

* review changes

* review updates

---------

Co-authored-by: Dave Pearson <davep@davep.org>
This commit is contained in:
Will McGugan
2023-05-08 10:55:39 +01:00
committed by GitHub
parent c2a19bd632
commit 7db7139bb8
32 changed files with 3731 additions and 2564 deletions

View File

@@ -447,3 +447,15 @@ def test_split_horizontal_negative():
Region(10, 5, 22, 14),
Region(10, 19, 22, 1),
)
def test_translate_inside():
# Needs to be moved up
assert Region(10, 20, 10, 20).translate_inside(Region(0, 0, 30, 25)) == Region(
10, 5, 10, 20
)
# Already inside
assert Region(10, 10, 20, 5).translate_inside(Region(0, 0, 100, 100)) == Region(
10, 10, 20, 5
)