Skip to content

Conversation

@laggron42
Copy link
Contributor

Summary

This PR adds checks to ensure the view and parent properties of UI components are properly set when there are multiple layers of nesting. It also checks that all interaction_check methods are called.

Resolves #10335 when the tests pass.

Test details

The test will build the following nested objects: LayoutView > Container > ActionRow > Item (Button or Select)

They are constructed in 3 ways for each test:

  • class methods and decorators
  • class constructors (Container(ActionRow(Item())))
  • add_item methods (c=Container();c.add_item(...))

Current failing test cases:

  • item.parent not set for items created via class constructors
  • item.parent returns a different instance than row but of correct type for a button created via decorator
    • item.parent.parent set to None instead of container

Checklist

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • 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, ...)

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.

[V2 components] Weird nesting behavior

1 participant