Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Streamline API and interface implementation #214

Open
@hpehl

Description

@hpehl

All (sub)components should have a common API for dealing with identifiers, text, icon, events et al.

  • Implement WithIdentifier for (sub)components that need an identifier
  • Implement WithText for (sub)components that have a text
  • Implement WithIcon for (sub)components that have an icon
  • Implement WithIconAndText for (sub)components that have both
  • Implement HasItems for (sub)components that have a list of items to be displayed as subcomponents
  • Implement ComponentStore for (sub)components that need to store arbitrary contextual data
  • Implement HasValue and optionally WithObservableValue for (sub)components that have an (observable) value
  • Limit the usage of interfaces from Elemento: Right now all (sub)components implement HasElement<E, B>, HasHTMLElement<E, B>, Finder<E>, and Container<E, B>. This leads to ambiguous methods for text manipulation. One solution is to add specific methods for DOM and CSS manipulation to the BaseComponent and SubComponent class and remove the implementation of the Elemento interfaces.
  • Document common interfaces in https://github.com/patternfly-java/patternfly-java/blob/main/showcase/common/src/doc/api-design.md#common-interfaces

Metadata

Metadata

Assignees

Labels

api-designDiscussion about the API

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions