Koala - Add slot to pass battery SoC to child - SliderDouble#3216
Merged
benderl merged 1 commit intoopenWB:masterfrom Mar 19, 2026
Merged
Koala - Add slot to pass battery SoC to child - SliderDouble#3216benderl merged 1 commit intoopenWB:masterfrom
benderl merged 1 commit intoopenWB:masterfrom
Conversation
benderl
approved these changes
Mar 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Im BatteryCard wurde der SoC-Wert fälschlicherweise durch den Text „Kein SoC-Modul konfiguriert“ überschrieben.
Grund dafür ist, dass die Logik im SliderDouble auf das Vorhandensein eines vehicleSocType prüft – was im Batterie-Kontext nicht zutrifft.
Es wurde ein benannter Slot (value) im SliderDouble eingeführt, über den der anzeigte Wert bei Bedarf vom Parent überschrieben werden kann.
Der BatteryCard nutzt diesen Slot, um den SoC-Wert direkt darzustellen.
Alternativ wäre es möglich gewesen, die bestehende Logik im SliderDouble über eine zusätzliche Prop (z. B. batteryCard) anzupassen.
Dies hätte jedoch die Komponente weiter an spezifische Anwendungsfälle gekoppelt.
Der Slot-Ansatz wurde gewählt, da er:
• die bestehende Standardlogik unverändert lässt
• keine zusätzliche Kopplung durch neue Props einführt
• eine flexible und saubere Erweiterung ermöglicht