-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow basic formatting for templates of UI elements #123
Comments
The best way to do this would be to add Markdown support (same formatting as we use on GitHub). The smallest library that supports this comes in at 5kb: https://github.com/SimonWaldherr/micromarkdown.js That's small but still quite big for a feature that might not be used by 95% of the users. I would be open for including this if we can conditionally load this on demand. |
What if we support only our current use cases?
It will cover the startup messages and attribution cases, and will allow the following message: Invalid configThe following platforms contain invalid config: sensor Please check your configuration files and see logs for more information. For fault finding tips see here |
We could create an element for markdown. This way it will only load the js if the element is loaded. |
All elements for cards in the UI are included in the initial load so they would be included in the initial load. |
ah... that's right it will flatten it. |
I'm not seeing a good way to do this. |
One way I can think of is having a web component that includes the markdown be included in the static folder. We'll load it on demand when the card with a notification is shown. ( Using |
I like it. I'll have to dig it to see if I can figure out how to implement it. |
@kellerza I have added markdown to persistent notifications for now. Should be merged soon. I don't know that we are adding it anywhere else at this point. |
Thanks, persistent notification will be a great improvement! Not sure if there is an easy way to enable this for platform attributes? (like links) |
probably just a concatenated string. |
@kellerza Do we want to close this for now? |
Thanks @justweb1! |
…pdate SSID/BSSID errors and internal URL
Basic formatting for UI elements like persistent_notifications and device attributes could improve the information significantly.
This could include: linebreaks as a minimum, links, and lastly bold or italics.
Examples of current UI displays that could be improved:
The text was updated successfully, but these errors were encountered: