Skip to content

Show the integration brand icon when there is no entity in logbook#12713

Merged
balloob merged 5 commits intohome-assistant:devfrom
bdraco:brand_icon_for_described_events
May 18, 2022
Merged

Show the integration brand icon when there is no entity in logbook#12713
balloob merged 5 commits intohome-assistant:devfrom
bdraco:brand_icon_for_described_events

Conversation

@bdraco
Copy link
Copy Markdown
Member

@bdraco bdraco commented May 17, 2022

Proposed change

  • As more integrations add logbook descriptions they will
    have no icon. We can use the brand icon for the integration
    when when we do not have an icon.

Before
Screen Shot 2022-05-17 at 10 28 20
After
Screen Shot 2022-05-17 at 11 32 40
Screen Shot 2022-05-17 at 11 37 49

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 or discussion:
  • 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:

- As more integration add logbook descriptions they will
  have no icon. We can use the brand icon for the integration
  when when we do not have an icon.
@bdraco bdraco changed the title Show the integration brand icon when there is no entity Show the integration brand icon when there is no entity in logbook May 17, 2022
@bdraco bdraco marked this pull request as draft May 17, 2022 16:52
@bdraco

This comment was marked as outdated.

@bdraco bdraco marked this pull request as ready for review May 17, 2022 17:07
(!stateObj &&
!overrideIcon &&
item.domain &&
isComponentLoaded(this.hass, item.domain)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why guard if it's loaded?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I figured we didn't want the overhead of loading an image if it was likely to not exist and they would get 'icon not found' image which didn't look so hot in this context

@balloob balloob merged commit f4f51e1 into home-assistant:dev May 18, 2022
@github-actions github-actions bot locked and limited conversation to collaborators May 19, 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.

3 participants