♻️ change call-service row to button row#4744
Merged
bramkragten merged 11 commits intohome-assistant:devfrom Apr 1, 2020
Merged
♻️ change call-service row to button row#4744bramkragten merged 11 commits intohome-assistant:devfrom
bramkragten merged 11 commits intohome-assistant:devfrom
Conversation
Member
|
Nice, we should have scene and script row extend this as well. |
bramkragten
reviewed
Feb 4, 2020
f085078 to
2ec2fda
Compare
bramkragten
reviewed
Feb 17, 2020
bramkragten
reviewed
Feb 17, 2020
bramkragten
reviewed
Feb 17, 2020
722dba2 to
03b8720
Compare
7 tasks
bramkragten
reviewed
Mar 31, 2020
zsarnett
reviewed
Apr 1, 2020
bramkragten
reviewed
Apr 1, 2020
| @property() private _config?: CallServiceConfig; | ||
| export class HuiCallServiceRow extends HuiButtonRow { | ||
| public setConfig(config: ButtonRowConfig): void { | ||
| const callServiceConfig: any = config; |
Member
There was a problem hiding this comment.
Why should keep the interface for CallServiceConfig
bramkragten
reviewed
Apr 1, 2020
|
|
||
| @property() private _config?: CallServiceConfig; | ||
| export class HuiCallServiceRow extends HuiButtonRow { | ||
| public setConfig(config: ButtonRowConfig): void { |
Member
There was a problem hiding this comment.
Suggested change
| public setConfig(config: ButtonRowConfig): void { | |
| public setConfig(config: CallServiceConfig): void { |
Member
Author
There was a problem hiding this comment.
Can't change the signature of setConfig
Contributor
There was a problem hiding this comment.
I think the best way would be
const buttonRowConfig: ButtonRowConfig = {...config, type: 'button'};
super.setConfig(buttonRowConfig);Similar to how the Sensor card does for entity card extending
bramkragten
approved these changes
Apr 1, 2020
iantrich
commented
Apr 1, 2020
| | WeblinkConfig | ||
| | ButtonsRowConfig | ||
| | ConditionalRowConfig | ||
| | ButtonRowConfig |
Member
Author
There was a problem hiding this comment.
why did you remove this?
Merged
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Breaking change
Proposed change
Rename
call-servicespecial row type tobutton. Will allow us to better align between row/card/element. Non-breaking change ascall-servicerow now just extendsbuttonrowType of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: