v3.2.0
CascadeUI v3.2.0 catches up to discord.py 2.4-2.5 primitives with three new framework features built on DynamicItem, SelectDefaultValue, and ui.Label. Adds the long-promised multi-category role-assignment pattern, closes several push/pop correctness gaps, and fixes a subtle undo sentinel bug that broke slot-touching reducer chains.
Added
DynamicPersistentButtonprimitive wrappingdiscord.ui.DynamicItem; subclasses auto-register at definition time and route correctly after restart with no extra setup.RolesLayoutView/PersistentRolesLayoutViewpattern -- multi-category role-assign panel built onDynamicPersistentButtonwith cardinality enforcement, three-tier customization, and five event hooks.SelectDefaultValueadoption onRoleSelect,UserSelect,ChannelSelect, andMentionableSelectviadefault_values=kwarg.- Four new
LeaderboardLayoutViewclass attributes (podium_emojis,entry_separator,card_color,show_title_divider) for single-line ranking customization. nav_inside_containerClassVar onPaginatedLayoutViewfor unified-Container pagination layouts.push()andreplace()accept pre-constructed view instances alongside view classes;push()andpop()now unconditionally edit the Discord message.StatefulButtonandStatefulSelectowner_only=kwarg for view-level open + button-level host-only patterns.- Migration guide for users coming from @Soheab's paginator gists (CV2 / classic) in the patterns guide.
Changed
- Modal input wrappers now render through
discord.ui.Label(discord.py 2.5+ pattern), with newdescription=kwarg for secondary helper text. User-facing API unchanged. v2_persistence.pyexample rewritten usingPersistentRolesLayoutView._reattach_onebatches registration dispatches so persistent views produce oneBATCH_COMPLETEnotification per restored view instead of three.
Fixed
- Acting-view fast-path stall no longer falls through to the channel endpoint -- the auto-defer timer acks the click with full remaining budget so Discord latency does not produce "interaction failed" toasts.
- Auto back button survives pattern rebuilds -- paginated page turns, tab switches, form re-layout, menu refresh, and wizard step advance all preserve the back button.
- Undo + slot-touching reducer chain no longer crashes with
TypeError; the_MISSINGsentinel now survives@cascade_reducer's state deep-copy boundary. - Quickstart counter example was missing
subscribed_actions-- V2 and V1 examples now declare the attribute. _reattach_oneregistration order corrected (active_views before VIEW_CREATED).
Install
pip install pycascadeui==3.2.0
See the full CHANGELOG for complete detail including all internal helpers, type aliases, and documentation additions.
Full Changelog: v3.1.0...v3.2.0