Skip to content

feat: implement cv2 layout parsing - #50

Merged
Sharp-Eyes merged 20 commits into
masterfrom
feat/cv2-parse
Oct 8, 2025
Merged

Sharp-Eyes merged 20 commits into
masterfrom
feat/cv2-parse

Conversation

@Sharp-Eyes

@Sharp-Eyes Sharp-Eyes commented Oct 7, 2025 •

Copy link
Copy Markdown
Member

This PR implements CV2 layout parsing support through ComponentManager.parse_message_components and :meth:ComponentManager.update_layout.

ComponentManager.parse_message_components takes a raw component layout (e.g. message.components) and turns it into an equivalent UI component layout + a separate list of all rich components;
:meth:ComponentManager.update_layout then takes both the UI component layout and the rich components again to update the UI component layout in-place with all the changes made to the rich components. The layout can then be sent as-is with any method (e.g. interaction.response.send_message).

Take a look at the v2 example to see how these work.

Breaking changes

  • ComponentManager.parse_message_components now takes components instead of a message,
  • ComponentManager.finalise_layout is removed in favour of :meth:ComponentManager.update_layout.

@Sharp-Eyes Sharp-Eyes added enhancement New feature or request breaking change refactor Refactor an existing feature labels Oct 7, 2025
@Sharp-Eyes Sharp-Eyes changed the title Feat/cv2 parse feat: implement cv2 layout parsing Oct 7, 2025
@Sharp-Eyes
Sharp-Eyes merged commit d747608 into master Oct 8, 2025
5 of 7 checks passed
@Sharp-Eyes
Sharp-Eyes deleted the feat/cv2-parse branch October 8, 2025 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change enhancement New feature or request refactor Refactor an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant