Skip to content

Conversation

NeloBlivion
Copy link
Member

@NeloBlivion NeloBlivion commented Sep 3, 2025

Summary

  • View and Modal now only support original components (Button / Select, InputText) - assume behavior from <=2.6.1
  • New components are now used in DesignerView and DesignerModal (names not finalised idk)
  • Usage is basically the same as rc1, with some differences
    • DesignerView and Container do not support Button, @button, Select and @select directly; use ActionRow instead.
    • Section still supports Button as accessory and the button decorator
    • DesignerModal does not support InputText and Select directly; use Label instead. TextDisplay still works as a top-level component.
    • InputText.description, Select.label and Select.description are removed as they are part of the Label component
  • DesignerView can still be used for v1 messages (supporting content and embeds) if you want to migrate to ActionRow for any reason.
  • Attempting to add ActionRow to a View will add the row's children instead
  • Item has been split into ViewItem and ModalItem
    • InputText and Label now inherit ModalItem
    • All View-based items now inherit ViewItem
    • Select and TextDisplay inherit both ViewItem and ModalItem (even though Select is not a top-level modal item, i believe it still fits)
  • Added store parameter to ItemInterface; setting it to False will prevent the interface from being added to ViewStore/ModalStore, and as such will not trigger callbacks or refresh item states.
  • Added Webhook.parent (interaction that created the webhook) and Webhook.from_interaction

Information

  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed).
  • This PR is not a code change (e.g. documentation, README, typehinting,
    examples, ...).

Checklist

  • I have searched the open pull requests for duplicates.
  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • If type: ignore comments were used, a comment is also left explaining why.
  • I have updated the changelog to include these changes.

@NeloBlivion NeloBlivion added this to the v2.7 milestone Sep 3, 2025
@NeloBlivion NeloBlivion self-assigned this Sep 3, 2025
@NeloBlivion NeloBlivion changed the title fix: general issues with views feat: ui.ActionRow Sep 3, 2025
@NeloBlivion
Copy link
Member Author

changing this to a general feature pr teehee

@NeloBlivion NeloBlivion changed the title feat: ui.ActionRow feat: redo CV2 and New Modal implementation Sep 16, 2025
@NeloBlivion NeloBlivion mentioned this pull request Sep 18, 2025
9 tasks
Copy link
Member

@Paillat-dev Paillat-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works now, minor mishap

Traceback (most recent call last):
  File "C:\Users\jerem\Documents\pycord\pycord\test_model3.py", line 78, in on_timeout
    await self.parent.edit(view=self)
          ^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'edit'

Paillat-dev
Paillat-dev previously approved these changes Oct 6, 2025
Copy link
Member

@Paillat-dev Paillat-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah whatever this is fine

@Paillat-dev Paillat-dev self-requested a review October 9, 2025 08:44
@SilberGecko6917
Copy link

The ModalItem class does not support the new FileUpload

@NeloBlivion
Copy link
Member Author

The ModalItem class does not support the new FileUpload

Did you mean something apart from the clarification i just added? As far as I tested everything worked fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Button Behaviour Inconsitency when using rows parameter

7 participants