-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add spacing card #24403
base: dev
Are you sure you want to change the base?
Add spacing card #24403
Conversation
Can we have 1x1 default size on the grid? Also, can we color it in preview mode so it appears in edit mode? |
.filter((card: Card) => | ||
this.isSectionsView ? true : !card.sectionsViewOnly | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we instead just skip the filter? It will still iterate over all the items now
const viewCards = this.isSectionsView ? coreCards : coreCards.filter(card => !card.sectionsViewOnly);
let cards = viewCards.map(...)
@@ -66,6 +66,7 @@ export interface Card { | |||
showElement?: boolean; | |||
isCustom?: boolean; | |||
isSuggested?: boolean; | |||
sectionsViewOnly?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this instead be a list of allowed (or disallowed?) view types?
@@ -146,6 +146,10 @@ export class HuiCreateDialogCard | |||
.lovelace=${this._params.lovelaceConfig} | |||
.hass=${this.hass} | |||
@config-changed=${this._handleCardPicked} | |||
.isSectionsView=${this._isSectionsView( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rather do this by just passing the view type
Proposed change
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: