Skip to content
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

Icon not showing #30

Closed
defisit opened this issue Jun 14, 2022 · 9 comments
Closed

Icon not showing #30

defisit opened this issue Jun 14, 2022 · 9 comments

Comments

@defisit
Copy link

defisit commented Jun 14, 2022

Hi,

Thank you very much for all the work that was put into 'custom-icons', I like the icons very much. I do have an issue though ;)
I am using an icon and have it configured as below. The issue is that the icon disappears once the page is refreshed F5. To get it back, I have to edit the main page again and press Klaar (my installation is in Dutch). Same on mobile app. Do I have to include something in the configuration.yaml (extra_module_url:) as with other icon packages like hass-hue-icons.js?

image

Like this:

image

@Mariusthvdb
Copy link
Owner

no that shouldn't be necessary...

just to be sure, did you install the .js resource (via HACS or manually), or did you try the experimental Custom Integration?

@defisit
Copy link
Author

defisit commented Jun 16, 2022

Using HACS.

@Mariusthvdb
Copy link
Owner

Mariusthvdb commented Jun 16, 2022

mm, cant make that happen:

Schermafbeelding 2022-06-16 om 13 33 54Schermafbeelding 2022-06-16 om 13 35 31

remains in view, no matter what. and I just now created 2 quick (empty yet) views

anything in the inspector logs you can see?

@arallsopp
Copy link
Collaborator

If you can open the JavaScript console, you should be able to determine whether the library has loaded when those icons don’t appear.

I’ve had trouble with icons that appear in the menus of the initial page load in hass-hue-icons.

I’d try adding the resource line for your dash and retesting, as it could be a similar thing?

@defisit
Copy link
Author

defisit commented Jun 16, 2022

For the inspector logs, I have to include below in cf.yaml?

--
logger:
default: info
logs:
custom_components.hacs: debug
aiogithubapi: debug

Concerning the brower console:

Icon not visible (pressed F5):

image

Console when icon visible (after a Customize UI and pressing Done)

image

It seems libraries are loaded correctly?

@Mariusthvdb
Copy link
Owner

no, inspector logs is the frontend, the yaml debug settings are for backend.
if there's a frontend issue of any sorts, it would show

and yes, seems the resource is loaded correctly.

What I did notice in my empty UI dashboard above, is the creating the first view (the one with the home icon) and simply closed thereafter, no icon showed. It wasnt until I added a second tab (also empty) the first tab showed . Thought is was me being clumsy with the UI, so didnt give it a further thought. Now were trying to find a source for an issue, I better mention it ;-)

so going back, I can now reproduce:

Schermafbeelding 2022-06-16 om 16 18 15

which is really odd, because the icon is there, and showing correctly in editor:

Schermafbeelding 2022-06-16 om 16 17 58

I wonder if that could be anything in the path we've omitted. Still, in my test view all are showing as they should without a hiccup. This is however yaml configured, so that might be a cue too, icon far right:

Schermafbeelding 2022-06-16 om 16 20 48

and selected:

Schermafbeelding 2022-06-16 om 16 20 57

all icons on:

Schermafbeelding 2022-06-16 om 16 21 08

Andy, can you check/verify if there's a difference between yaml and UI dashboards?

@arallsopp
Copy link
Collaborator

Do I have to include something in the configuration.yaml (extra_module_url:) as with other icon packages like hass-hue-icons.js?

@defisit, I would try that first. I'm unsure why it needs to be done on some installs, but it does seem to remove issues. I added it to solve an intermittent issue where the first page loaded didn't always get the resource in time, but with the frontend extra_module_url in place, have seen many related issues that pop up on the forums disappear.

@defisit
Copy link
Author

defisit commented Jun 28, 2022

Do I have to include something in the configuration.yaml (extra_module_url:) as with other icon packages like hass-hue-icons.js?

@defisit, I would try that first. I'm unsure why it needs to be done on some installs, but it does seem to remove issues. I added it to solve an intermittent issue where the first page loaded didn't always get the resource in time, but with the frontend extra_module_url in place, have seen many related issues that pop up on the forums disappear.

Did that and it works around the issue, thanks!

@Mariusthvdb
Copy link
Owner

great, closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants