-
Notifications
You must be signed in to change notification settings - Fork 16
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
Using fontawesome class in digital collection title breaks "SVG withJS" #169
Comments
I'd be happy to work on this if/when you indicate a preference among the possible solutions, @DiegoPino. |
@patdunlavey Ok, but we do not ship"SVG with JS" enabled nor a newer version of Font Awesome where CSS is deprecated. I feel this might be a thing if you are thinking of improving the Archipelago Sub theme as a module that pre processes data and that matches the (changed) settings here. But I'm not very eager to make changes of our reference configuration based on possible future changes people might do. There is a more pressing need in the theming / render array interaction (going for a pull soon, reported by Jordan) where the the Field UI (e.g Changing a field formatter) with our current settings for Bootstrap (use input instead of buttons) break AJAX (Issue will come soon) So, said differently, the reference deployment might document that if Something is changed then something might break? Or, if you are willing to go the full route, allow maybe even at the render array (themes can affect that) change something to make it work too with SVG with JS. But as it is now I see this as a lower priority. Please fight me back of course |
Agreed, not a high priority, and documenting a solution, possibly just in this ticket (e.g. share my implementation of hook_preprocess_field), could be "good enough" for now. Here's that implementation:
|
@patdunlavey I like your MY_THEME_preprocess_field, you willing to make a pull against archipelago_subtheme? It feels clean and useful |
Absolutely! Will do. |
PR created! |
If you go to font awesome's settings page and choose the recommended "SVG with JS" as the "Font Awesome Method", and view search results that includes a digital collection, rather than showing the folder icon, we seen an animated icon of a exclamation/question mark. This comes from the title field being configured in the "Digital Object with thumbnail and abstract" view mode with the classes "fas fa-archive" being applied to the h2 wrapper tag - which is not "legal" in font-awesome when using the "SVG with JS" method (it works fine using the to-be-deprecated "Web Fonts with CSS" method).
Here's where this is coded.
The correct markup should put these classes inside a
<i>
tag. I dealt with it in my local install by implementing hook_preprocess_field() to alter the markup. If we were ambitious, in a custom field widget/formatter might be the the more correct solution? Or possibly this module actually gives us the field formatter we need?This issue is also present in archipelago_deployment_live. Should I make a separate issue there?
The text was updated successfully, but these errors were encountered: