Skip to content

Lovelace: custom badges and state-badge actions#10915

Merged
frenck merged 5 commits into
home-assistant:nextfrom
iantrich:custom-badges
Oct 23, 2019
Merged

Lovelace: custom badges and state-badge actions#10915
frenck merged 5 commits into
home-assistant:nextfrom
iantrich:custom-badges

Conversation

@iantrich
Copy link
Copy Markdown
Member

@iantrich iantrich commented Oct 21, 2019

Description:

home-assistant/frontend#3867
home-assistant/frontend#4028

Checklist:

  • Branch: next is for changes and new documentation that will go public with the next Home Assistant release. Fixes, changes and adjustments for the current release should be created against current.
  • The documentation follows the standards.

@probot-home-assistant probot-home-assistant Bot added has-parent This PR has a parent PR in another repo next This PR goes into the next branch Hacktoberfest An PR on this issue (or the PR itself) is eligible towards Hacktoberfest! labels Oct 21, 2019
@iantrich
Copy link
Copy Markdown
Member Author

So, I've added custom badges here and need them listed on the sidebar as cards are but I'm not sure how to accomplish this; will need some guidance

@iantrich iantrich changed the title custom badges and state-badge actions Lovelace: custom badges and state-badge actions Oct 21, 2019
@iantrich iantrich self-assigned this Oct 21, 2019
@frenck frenck added new-feature This PR adds documentation for a new Home Assistant feature to an existing integration parent-merged The parent PR has been merged already labels Oct 21, 2019
@iantrich iantrich added the in-progress This PR/Issue is currently being worked on label Oct 21, 2019
@iantrich
Copy link
Copy Markdown
Member Author

I need further help on this. I'm not sure how to structure the docs so that I can get the badges in the sidebar.

@frenck
Copy link
Copy Markdown
Member

frenck commented Oct 22, 2019

@iantrich The main problem with this is, that Jekyll does not support nested collections (which you are trying to do as it seems).

I see 2 possible options:

  1. Add a _badges folder next to _lovelace but that will disconnect it from the user experience maybe.
  2. Add a type kinda variable to the frontmatter in every markdown in the _lovelace collection (e.g., card, badge) and filter the collection when creating those 2 separate menu's. In order to reduce effort on changing all of them, the default of the frontmatter config can be set to card in the Jekyll config, so it only needs to be overridden for badges.

I have to be honest here: Both aren't pretty IMHO. 😢

@iantrich
Copy link
Copy Markdown
Member Author

I might just throw this in the views markdown for now 🤷‍♂

Copy link
Copy Markdown
Member

frenck commented Oct 22, 2019

Well, that is a good start, right? :)

Copy link
Copy Markdown
Member

frenck commented Oct 22, 2019

Working first, pretty later :)

@iantrich iantrich removed the in-progress This PR/Issue is currently being worked on label Oct 23, 2019
Copy link
Copy Markdown
Member

@frenck frenck left a comment

Choose a reason for hiding this comment

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

👍

@frenck frenck merged commit 046b281 into home-assistant:next Oct 23, 2019
@probot-home-assistant probot-home-assistant Bot removed the parent-merged The parent PR has been merged already label Oct 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Hacktoberfest An PR on this issue (or the PR itself) is eligible towards Hacktoberfest! has-parent This PR has a parent PR in another repo new-feature This PR adds documentation for a new Home Assistant feature to an existing integration next This PR goes into the next branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants