Skip to content

HasOrderedComponents's Methods should be available in HasComponents #23687

@OriginalFelix

Description

@OriginalFelix

Describe your motivation

The core problem is that the HasOrderedComponents interface contains methods that are universally applicable to all components. Ideally, these methods should also be present in HasComponents, but they are not.

There is no reason to distinguish between HasOrderedComponents and HasComponents, as the interfaces only contain default methods that directly access the element API.

Furthermore, due to the nature of Java and Vaadin, component structures are always ordered by default, in the order they were added in the source code.

Describe the solution you'd like

The functions of HasOrderedComponents should instead be exposed in HasComponents, and the HasOrderedComponents interface should be given an empty shell for those methods that only call super, in order to remain backward compatible.

Describe alternatives you've considered

We considered implementing our own method that executes the exact same code as in HasOrderedComponents.replace; this would work as a temporary solution, but it's not the ideal solution.

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Done / Pending Release

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions