-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Card_Mod CSS erases when selecting 'EDIT' for a section of a dashboard #23464
Comments
|
Thanks for the reply,
Card_mod is a custom plugin, yes, but it is the HA visual editor that is removing the code, not the plugin.
I wouldn't say huge, but if you can't take an example from the provided code, that's on you. I'm just trying to provide a large enough sample, it doesn't ask for a minimal sample, it asks for YAML, regardless if I feel it is relevant, so I provided a large enough selection.
Thanks Thanks This would be less of an issue if when you click on edit it gave you the option for visual or code editor or code editor was an option in the drop down menu from the three dots on the right, but unfortunately you have to open the entire dashboard in YAML if you want to go straight to code, which is a pain when you want to focus on just one section. |
I will not be a person go will decide to close this issue. For your future experience - google what MWE is & why it is crucial to provide MWE in issues (even if it is not said explicitly in "Create issue" template). |
I looked at this before and I'm quite sure its from a behavior of card mod injecting code into and messing with the visual editor. Card mod repo is the right place to look at it. |
That's your opinion, but I will respond to the requirements of the form how I interpret. |
What happens if you add just a non-existant key to your card source, just add like I believe that will also disable the visual editor. You can request the feature on the forum, I am not sure about how UX designers will feel about it. |
I will give it a try, the only downside is if the issue is fixed in card_mod I won't know because the editor will always default to code editor. At the moment, I can open the editor and if the card_mod is removed, I just click on cancel and it leaves the code there. I hope at some point there will be a fix and I can go back to editing as previous, using both visual and code for a card_mod card. |
Checklist
Describe the issue you are experiencing
I know card_mod is a custom function, but it is the visual editor that erases the code. If I open the editor in YAML, it retains the card mod css section, but not in visual editor.
It only erases the code of the selected card though, so when I have a horizontal row of cards with card_mod added and the first card is selected, only that card looses it's card mod YAML, the rest of the row retains the code until they are selected (by selecting card number: 1,2,3,4,etc).
Describe the behavior you expected
Any additional YAML code should not be errased.
I don't understand why a CSS editor is not just an existing function of the visual editor in the first place, as this seems to be EXTREMELY popular amongst dashboard creators. But why does it have to erase additional code, it didn't in previous versions.
Steps to reproduce the issue
...
What version of Home Assistant Core has the issue?
2024.12.5
What was the last working version of Home Assistant Core?
No response
In which browser are you experiencing the issue with?
Chrome and HA app
Which operating system are you using to run this browser?
Windows 10 Pro, iOS on iPhone (always the latest, but not beta)
State of relevant entities
No response
Problem-relevant frontend configuration
Javascript errors shown in your browser console/inspector
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: