Skip to content

Feature/badge preview#3902

Closed
tomraithel wants to merge 3 commits into
home-assistant:devfrom
tomraithel:feature/badge-preview
Closed

Feature/badge preview#3902
tomraithel wants to merge 3 commits into
home-assistant:devfrom
tomraithel:feature/badge-preview

Conversation

@tomraithel
Copy link
Copy Markdown
Contributor

Fixes #3825

This PR adds a preview for the View Configuration to getter a better visual feedback how the badges would look like.

@iantrich
Copy link
Copy Markdown
Member

iantrich commented Oct 4, 2019

Don't think will play nicely with custom badges #3867

@bramkragten
Copy link
Copy Markdown
Member

Don't think will play nicely with custom badges #3867

No, with custom badges comes a new editor. We should take the badges out of the view editor and give it it's own edit dialog per badge just like cards.

@tomraithel
Copy link
Copy Markdown
Contributor Author

Ok, It´s not so clear to me, what the next steps for this PR are. It reads, that it does not make a lot of sense to merge this changes in because it will be obsolete once the new editor is in place, correct?

I could revert the preview mode in entity editor but keep the refactoring for the badge-group and the disabled attribute. Does this help or should we just get rid of this PR in general?

@bramkragten
Copy link
Copy Markdown
Member

I think we should wait for the custom badges PR to merge, we can then refactor this PR so it uses the new logic to build the badges. Would be a relative simple change I think.

@iantrich
Copy link
Copy Markdown
Member

I'll try to get the custom badges PR cleaned up in the next couple of days

@bramkragten
Copy link
Copy Markdown
Member

@tomraithel
Copy link
Copy Markdown
Contributor Author

Hey. I've updated my branch to the recent changes without any conflicts. So the badge preview still works.
What I don't understand is how I can configure a custom badge? Is that possible via the UI or only via yaml configuration?

@bramkragten
Copy link
Copy Markdown
Member

Only yaml right now, next step is to create a editor for badges.

@tomraithel
Copy link
Copy Markdown
Contributor Author

Is there than anything more to do for this PR? The preview seems to work correctly with the new badge build logic.

@bramkragten
Copy link
Copy Markdown
Member

Yes, we need to add the new create badge logic. We only create state-badges now in the preview, but there could be other types of badges in it that we also need to render correctly.

@bramkragten
Copy link
Copy Markdown
Member

Closing this as it has gone stale. If you would like to continue on this please open a new PR.

@bramkragten bramkragten closed this Jan 8, 2020
@zsarnett zsarnett mentioned this pull request Mar 25, 2020
5 tasks
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 6, 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.

Preview for badges on View Configuration UI editor

5 participants