Feature/decouple resolver#9
Conversation
There was a problem hiding this comment.
Danke für den PR — die Richtung sieht für mich grundsätzlich gut aus, insbesondere die Entkopplung der Vokabular-/Resolver-Logik über einen Provider sowie die Möglichkeit, die Metadata-Komponente als Web Component zu bootstrappen.
Vor dem Merge hätte ich noch einen zentralen Punkt zur API-Dokumentation:
Die öffentliche API der Komponente ändert sich deutlich. Vorher wurden u. a. profile, metadata, vocabularies und vocabulariesIdDictionary übergeben; jetzt sind es profileData, metadataValues und vocabularyProvider. Das passt fachlich gut zur Entkopplung des Resolvers, ist aber für Konsumenten ein Breaking Change.
Mein Vorschlag wäre, im PR bzw. idealerweise in README/Release Notes kurz einen Abschnitt „Migration“ zu ergänzen, zum Beispiel in dieser Form:
## Migration: resolver decoupling
The metadata component no longer receives vocabularies and vocabulary dictionaries directly.
Instead, consumers provide a `vocabularyProvider`.
Before:
```html
<iqb-profile-form
[profile]="profile"
[metadata]="metadata"
[vocabularies]="vocabularies"
[vocabulariesIdDictionary]="vocabulariesIdDictionary"
(metadataChange)="onMetadataChange($event)">
</iqb-profile-form>After:
<metadata-profile-form
[profileData]="profile"
[metadataValues]="metadata"
[vocabularyProvider]="metadataResolver"
(metadataChange)="onMetadataChange($event)">
</metadata-profile-form>The vocabularyProvider must provide the vocabularies and vocabulary dictionary required by the metadata component.
Codebase for newest version 0.2.3
This pr also contains fixes for the lint-backlog