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

Skip to content

Streamline API and interface implementation #214

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
9 tasks
hpehl opened this issue Jul 30, 2024 · 0 comments
Open
9 tasks

Streamline API and interface implementation #214

hpehl opened this issue Jul 30, 2024 · 0 comments
Assignees
Labels
api-design Discussion about the API
Milestone

Comments

@hpehl
Copy link
Contributor

hpehl commented Jul 30, 2024

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
@hpehl hpehl self-assigned this Jul 30, 2024
@hpehl hpehl added this to the v0.3.0 milestone Jul 30, 2024
@hpehl hpehl added the api-design Discussion about the API label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-design Discussion about the API
Projects
None yet
Development

No branches or pull requests

1 participant