Skip to content

Only show header toggle for entities card if title#7525

Merged
balloob merged 1 commit intodevfrom
entities-card-toggle-header-if-title-only
Oct 29, 2020
Merged

Only show header toggle for entities card if title#7525
balloob merged 1 commit intodevfrom
entities-card-toggle-header-if-title-only

Conversation

@balloob
Copy link
Member

@balloob balloob commented Oct 29, 2020

Breaking change

Proposed change

We should not show a header toggle as default config if no title is configured.

Before:

image

After:

image

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

Copy link
Contributor

@zsarnett zsarnett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should make this better in the editor as well. Its weird to toggle options and nothing to happen on the card

@bramkragten
Copy link
Member

We should make this better in the editor as well. Its weird to toggle options and nothing to happen on the card

This only does something when you didn't toggle it yet

@zsarnett
Copy link
Contributor

I am not sure I follow. Current the editor needs updated because I can toggle the show Header Toggle and it doesn't show. And there is no way of knowing why unless I read docs. Toggle the dialog and nothing happening is weird

If I don't have a title and then I toggle the show header toggle and it doesn't show then that is also weird

@bramkragten
Copy link
Member

bramkragten commented Oct 29, 2020

Thats not what this code does. Only when there is no show toggle config, it will try to check if we should or should not show the toggle.

@balloob
Copy link
Member Author

balloob commented Oct 29, 2020

The default if the setting is undefined is to derive if we should toggle it from the entities in the card. That default will now only consider toggleable entities if there is a header shown (because it has a title)

@balloob balloob merged commit 76a088e into dev Oct 29, 2020
@balloob balloob deleted the entities-card-toggle-header-if-title-only branch October 29, 2020 20:28
@bramkragten bramkragten mentioned this pull request Nov 11, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jul 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants