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

Icons not (always) loaded with default templates #171

Closed
YannickRe opened this issue Apr 3, 2020 · 2 comments
Closed

Icons not (always) loaded with default templates #171

YannickRe opened this issue Apr 3, 2020 · 2 comments
Assignees

Comments

@YannickRe
Copy link
Contributor

Version used
3.11.0

Describe the bug
The FileIcon is not always loaded on the Search Results web part. Chrome Dev Console shows

The icon "spo16_svg" was used but not registered. See http://aka.ms/fabric-icon-usage for more information.

To Reproduce
Steps to reproduce the behavior:

  1. Put a Search Results web part on the page
  2. Make it search for contentclass:STS_Site (make sure you have a classic site, or modern non-Group connected site in the results on the first page)
  3. Select the DetailsList template
  4. Save the page
  5. Do a full reload

Expected behavior
The icon shows up in the list.

Screenshots
Capture

Desktop (please complete the following information):

  • Browser Edgium/CrEdge

Additional context
Problem comes from these lines of code:

if (templateContent && templateContent.indexOf("fabric-icon") !== -1) {
// load CDN for icons
Loader.LoadUIFabricIcons();
}

Since DetailsList is moved to a web component which in turn uses the Icon web component, the indexOf doesn't find a reference to the usage of the icon.

I'd fix it myself but I am a bit out of tune with the current state, so in this particular case I have no idea how to consistently check whether or not an icon has been used in the template.

@wobba
Copy link
Collaborator

wobba commented Apr 5, 2020

Thank you for reporting and we'll sort it out. Adding the loading to the different web components using it could be a solution.

@wobba wobba self-assigned this Apr 8, 2020
wobba added a commit that referenced this issue Apr 8, 2020
Fixed documentation on fabric icon usage
@wobba
Copy link
Collaborator

wobba commented Apr 8, 2020

Fixed with #171

@wobba wobba closed this as completed Apr 8, 2020
wobba added a commit that referenced this issue Apr 8, 2020
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

2 participants