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

Dashicons not being enqueued for logged out users #41

Open
bobbingwide opened this issue Oct 17, 2020 · 2 comments
Open

Dashicons not being enqueued for logged out users #41

bobbingwide opened this issue Oct 17, 2020 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@bobbingwide
Copy link
Owner

The output for the block list block ( oik-block/blocklist ) assumes that the dashicons CSS is enqueued.
It appears that this is no longer the case with Gutenberg 9.1.0.
The result is that the icons for blocks which use dashicons are not displayed on the front end.

It would appear that the fix to this would be to enqueue dashicons.

@bobbingwide bobbingwide added the bug Something isn't working label Oct 17, 2020
@bobbingwide bobbingwide self-assigned this Oct 17, 2020
bobbingwide added a commit that referenced this issue Oct 26, 2020
…s that use dashicons to logged out users
@bobbingwide
Copy link
Owner Author

The solution to enqueue dashicons for every page is not good for performance.
Two options

  1. Change dashicons to use SVG icons
  2. Only enqueue dashicons when the dashicon block is present.

Option two would be quicker to implement.
Option one would be better overall.
In the mean time, the change to not enqueue dashicons needs to be undone.

@bobbingwide
Copy link
Owner Author

  1. Change dashicons to use SVG icons

We can do this for the blockicon block,
but not for the blockinfo or blocklist blocks since it's not so easy to parse the HTML to find which blocks use dashicons.

  1. Only enqueue dashicons when the dashicon block is present.

Do this when we know there's a blockicon but can't determine the name of the icon from the block's registration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant