-
-
Notifications
You must be signed in to change notification settings - Fork 209
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
Update the icons used for contacts #3945
Comments
Icons: personicons.zip |
The icons are displayed at 60 x 60 px on profile detail pages (RHS) and on targets widgets (if applicable). In all other cases they are displayed at 30 x 30 px. |
Modifies the 'resources' doc with the default icons for clinic, health_center, district_hospital, and person so we're not limited to the font-awesome icons. medic/cht-core#3945
Uses the static resources doc rather than the font awesome fonts which means we have more flexibility and also makes the icons configurable. #3945
Two PRs to review please @alxndrsn This change also makes the icons configurable which is a bonus feature... |
Modifies the 'resources' doc with the default icons for clinic, health_center, district_hospital, and person so we're not limited to the font-awesome icons. medic/cht-core#3945
Uses the static resources doc rather than the font awesome fonts which means we have more flexibility and also makes the icons configurable. #3945
Strip out all the unnecessary code. Also remove the IDs which had duplicates and caused ID collisions when included together on the page. medic/cht-core#3945
The ResourceIcons service and resourceIcons filter now detect if the icon is an svg and inline the xml if it is. This means we can now apply css styles to the svg which is important, for example, when we want to use a coloured icon for clinic in the list and the same icon in white in the action bar. #3945
Code review please @SCdF |
@amandacilek To get the supplied csvs to be able to be styled I had to make some changes to them.
For example, the person svg: <?xml version="1.0" encoding="UTF-8"?>
<svg width="30px" height="30px" viewBox="0 0 30 30" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 46.2 (44496) - http://www.bohemiancoding.com/sketch -->
<title>icon/people/icon-personcrop</title>
<desc>Created with Sketch.</desc>
<defs>
<path d="M24.9761429,22.8241469 C24.9761429,25.187902 23.4437619,26.6034122 21.1880476,26.6034122 L8.78804762,26.6034122 C6.53233333,26.6034122 4.99995238,25.187902 4.99995238,22.8241469 C4.99995238,19.5258612 5.75185714,14.462351 9.909,14.462351 C10.349,14.462351 12.2075714,16.4905959 14.9880476,16.4905959 C17.769,16.4905959 19.6275714,14.462351 20.0670952,14.462351 C24.2242381,14.462351 24.9761429,19.5258612 24.9761429,22.8241469 M20.4361429,8.60390204 C20.4361429,11.6974531 17.9956667,14.2071673 14.9880476,14.2071673 C11.9804286,14.2071673 9.53995238,11.6974531 9.53995238,8.60390204 C9.53995238,5.50986122 11.9804286,2.99965714 14.9880476,2.99965714 C17.9956667,2.99965714 20.4361429,5.50986122 20.4361429,8.60390204" id="path-1"></path>
</defs>
<g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="icon/people/icon-personcrop">
<mask id="mask-2" fill="white">
<use xlink:href="#path-1"></use>
</mask>
<use id="personcrop" fill="#F47963" xlink:href="#path-1"></use>
<g id="color/03-rose" mask="url(#mask-2)">
<g transform="translate(-5.000000, -5.000000)"></g>
</g>
</g>
</g>
</svg> becomes... <svg width="30" height="30" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg"><path d="M25 22.8C25 25.2 23.4 26.6 21.2 26.6L8.8 26.6C6.5 26.6 5 25.2 5 22.8 5 19.5 5.8 14.5 9.9 14.5 10.3 14.5 12.2 16.5 15 16.5 17.8 16.5 19.6 14.5 20.1 14.5 24.2 14.5 25 19.5 25 22.8M20.4 8.6C20.4 11.7 18 14.2 15 14.2 12 14.2 9.5 11.7 9.5 8.6 9.5 5.5 12 3 15 3 18 3 20.4 5.5 20.4 8.6" fill="#F47963"/></svg> These rules will need to be followed for all future svgs you wish to include in the app. For AT: on servers that have already run the migration (eg: alpha.dev) this will not work. After upgrade please go to Configuration > Icons and upload the updated icons. |
The ResourceIcons service and resourceIcons filter now detect if the icon is an svg and inline the xml if it is. This means we can now apply css styles to the svg which is important, for example, when we want to use a coloured icon for clinic in the list and the same icon in white in the action bar. #3945
LGTM, merged |
Working well on alpha.dev. I'm seeing some weirdness with one of the other configurable icons, but we'll have to come back and re-test this during release testing to make sure everything works as expected on upgrade from 2.13 to 2.14. |
The district, health centre, clinic, and person icons need to be updated from font-awesome to custom svgs to be provided by @amandacilek everywhere they are used.
The text was updated successfully, but these errors were encountered: