harumaki4649
cc00d56a22
Fixed item state management in the UI View
* Fix ActionRow add_item type validation
* Fix View item state tracking
* Fix View add and remove item state
* Add UI view item state tests
2 months ago
Sacul
8470bc8fd1
Document which components need to be in a Label
2 months ago
Jakub Kuczys
3270121c80
Use iscoroutinefunction from inspect instead of asyncio on 3.12+
4 months ago
Rapptz
85144ec5e4
Fix ActionRow remove and add item not using Item.width
4 months ago
Pipythonmc
dae0142554
Change the default 'required' value to True for all select variants
Fixes #10339
4 months ago
Rapptz
b01de35fa2
Remove old workaround to /callback not having a return type
The old code needed a workaround using interaction_id to differentiate
between multiple instances being reused since they would all go into
the `None` key. Since /callback now returns a proper message_id this
could be used as a key instead of None. From testing, it seems this is
true for both edit_message and send_message responses.
6 months ago
Rapptz
616137875b
Fix memory leak with the view store when removing items
The previous code would maintain items in the dispatch mapping if
nested children were removed between calls because it would only
remove items that are live in the view at the point of removal. This
meant that calling something like ActionRow.clear_items() would keep
all the removed items within the mapping and would not be evicted.
This attempts to fix it by maintaining a cache state snapshot and
making a diff between the two versions to know which keys are now safe
to delete since they are no longer in the live view at all.
6 months ago
Rapptz
ef1cb6a089
Prevent empty dictionaries from being added to the ViewStore
Fix #10405
6 months ago
Michael
38d5d8e47a
Use walk_children within remove_view
6 months ago
Soheab
e5263c0870
Add support for new modal components
6 months ago
Steve C
dae46f7d0f
Add generics to Interaction params
6 months ago
Rapptz
a7d42b9906
Fallback to Item.row when converting to Modal component list
Fix #10397
7 months ago
Rapptz
3ab09be13c
Invert View.is_finished condition when there is no associated Future
7 months ago
Michael
bcea13e993
Allow ui.View initialization without a running event loop
7 months ago
Rapptz
0052878983
Guard against Item.view being None when dispatching
8 months ago
Soheab
9580898c97
Detach view from item when removed
9 months ago
DA344
e2cf721e9c
Fix container items having out of date internal state
10 months ago
Sacul
8f2cb60700
Fix inaccurate total_children_count property in modals
10 months ago
Rapptz
88294fe352
Fix Section.accessory setter not updating view bindings
11 months ago
Rapptz
651699fcd2
Remove buggy and unintentional Container.children setter
11 months ago
Rapptz
8f90b7d534
Add shoutout to Button and Thumbnail accessories for Section
11 months ago
Soheab_
d78636283b
Correct supported types in docs for modal components
11 months ago
Soheab_
178ea664b2
Add missing required kwarg to all select classes
11 months ago
Soheab_
2d7e0614ad
Add support for File Upload component
11 months ago
Soheab_
944ffe93c7
Handle resolved data for modal components and types
11 months ago
Soheab_
1d3642d1fe
Fix KeyError on custom_id for modal components that don't support it
11 months ago
Rapptz
78ff16621a
Fix certain component IDs not being able to be settable afterwards
Fix #10305
11 months ago
Lucas Hardt
a7f349498a
Upgrade code by using f-strings and yield from
12 months ago
Sacul
44956db033
Update modal example in docstring
12 months ago
Rapptz
89d5cbd78a
Move v2 item check from BaseView to View
12 months ago
Rapptz
116107d7ed
Add accessory to Section.__repr__
1 year ago
Rapptz
d5946d1cbc
Fix bounds for TextInput and Label generic
Fix #10280
1 year ago
lmaotrigine
50b0d219b5
Add missing versionadded to some BaseView items
1 year ago
Rapptz
63357e0113
Revert "Add second generic parameter for view for DynamicItem"
This reverts commit fe7ce982f3 .
1 year ago
Rapptz
9677dada1f
Fix Modal not raising when hitting the 5 item limit
1 year ago
Rapptz
bb45e050b9
Change Modal inheritance to BaseView instead of View
1 year ago
Rapptz
fe7ce982f3
Add second generic parameter for view for DynamicItem
1 year ago
Rapptz
6d5013030b
Flip if statement for wrapped ActionRow components in modals
1 year ago
Rapptz
de09031899
Allow TextDisplay as a top-level component in modals
1 year ago
Rapptz
9bda89b0d6
Update total count tracking to always consider the wrapper object
1 year ago
DA344
0309aac335
Add a swap method for dynamic item's dispatching
1 year ago
Rapptz
20f4bc40ad
Remove outdated comment
1 year ago
Rapptz
59e28af19f
Fix Section.accessory being MISSING
1 year ago
Sacul
27d69e98e2
Fix note in button decorator in action row
1 year ago
DA344
24aa98b923
Fix Section.children and accessory's parent being None
1 year ago
Rapptz
9dbf13c2f9
Document Section.accessory as an attribute
1 year ago
Rapptz
44a44e938f
Reformat entire project with ruff instead of black
1 year ago
Rapptz
3ef6272e07
Fix error with View.from_message when having multiple items
1 year ago
Rapptz
d58c055c5b
Remove unused import
1 year ago
Rapptz
5d49f11709
Remove View.from_dict typing
1 year ago