openscd / oscd-filtered-list

Apache License 2.0
0 stars 0 forks source link

Create ADR for; Don't rely on third party dependencies for the filteredlist #12

Closed Sander3003 closed 1 year ago

Sander3003 commented 1 year ago

Acceptance criteria: Use the ADR format; Discuss with the community

Stef3st commented 1 year ago

Don't rely on third party dependencies for the filtered-list

Date: 2023-05-04

Status

Open

Context

While starting to move components we started with the filterd-list, which is now published on npm. Functional wise the filterd-list works fine, but replacing the integrated filtered-list with the newly published stand alone filtere-list comes with unforseen complications.

In Open-SCD we use the integrated filtered-list as an extension of @material/mwc-list, because of this the filtered list gets cast to mwc-list. In the newly stand-alone components we made a decision to no longer extend the components from material webcomponents but use the material webcomponent in the render function. This is why casting to a mwc-list will no longer work.

Because the material web component will be implemented in the render function it also gets loaded differently, which can result in an empty list if it's called in the same manner as we do now in Open-SCD.

Decision

While implementing components in the future, be sure not to rely on third party dependencies. In case of the filtered-list this would be mwc-list. This means:

Consequences

These decisions will result in that implementation can not be simply used in the same manner as we do in Open-SCD right now. Be sure to make changes as stated in the decision.

Sander3003 commented 1 year ago

" in the same manner as we do in Open-SCD right now" can you be more specific? If we read this 5 years later, we don't know what this is.

Are their more consequences? E.g. takes more time? More flexible..

Sander3003 commented 1 year ago

In order to move forward, you can send a pull-request and ask for reviews ;) This is how we can get the community on board.