Skip to content

v3.2.0

Choose a tag to compare

@HollowTheSilver HollowTheSilver released this 30 Apr 20:12
· 7 commits to main since this release

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

  • DynamicPersistentButton primitive wrapping discord.ui.DynamicItem; subclasses auto-register at definition time and route correctly after restart with no extra setup.
  • RolesLayoutView / PersistentRolesLayoutView pattern -- multi-category role-assign panel built on DynamicPersistentButton with cardinality enforcement, three-tier customization, and five event hooks.
  • SelectDefaultValue adoption on RoleSelect, UserSelect, ChannelSelect, and MentionableSelect via default_values= kwarg.
  • Four new LeaderboardLayoutView class attributes (podium_emojis, entry_separator, card_color, show_title_divider) for single-line ranking customization.
  • nav_inside_container ClassVar on PaginatedLayoutView for unified-Container pagination layouts.
  • push() and replace() accept pre-constructed view instances alongside view classes; push() and pop() now unconditionally edit the Discord message.
  • StatefulButton and StatefulSelect owner_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 new description= kwarg for secondary helper text. User-facing API unchanged.
  • v2_persistence.py example rewritten using PersistentRolesLayoutView.
  • _reattach_one batches registration dispatches so persistent views produce one BATCH_COMPLETE notification 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 _MISSING sentinel 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_one registration 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