Sitecore / developer-portal

Open source repo for the Sitecore Developer Portal (https://developers.sitecore.com)
https://developers.sitecore.com
Apache License 2.0
31 stars 62 forks source link

Migrate PNG and SVG files from public directory to DAM #104

Closed jst-cyr closed 3 years ago

jst-cyr commented 3 years ago

All of the icons currently in /public need to be moved to DAM, and their code references updated to use the DAM public links instead of the local paths.

andershopkins commented 3 years ago

@jst-cyr Is this task specifically scoped to "fav icons" only?

jst-cyr commented 3 years ago

@jst-cyr Is this task specifically scoped to "fav icons" only?

@andershopkins : I hadn't scoped it down yet. Is there any reason to include/exclude some? Right now, the plan was to move everything that could be moved out of the /public folder.

andershopkins commented 3 years ago

Images referenced in CSS I think anything that's referenced in CSS should be probably live within the project, as you'd want direct control over the contents of that file and many contributors may not have access to the DAM.

At this point, that's only: https://github.com/Sitecore/developer-portal/blob/main/public/images/heros/hero-plus-pattern.png

UI Icons and the Sitecore Logo

  1. The Sitecore logo in the site navigation is an SVG used as a React component: https://github.com/Sitecore/developer-portal/blob/main/components/site/Nav/Logo.tsx

    This is to support dark mode.

  2. Additionally, the UI icons used on the site are SVGs-as-React-components, so they're not even in /public - they're a part of the components: https://github.com/Sitecore/developer-portal/tree/main/components/helper/icons

    This always fine-grained control over the SVG assets and allows us to inline the <svg> contents so we can do things like currentColor and other things we would not be able to do using an img tag.

jst-cyr commented 3 years ago

Thank you for the context @andershopkins , I suppose a good question to ask: Which image files currently in the GitHub repo would be safe to move to the DAM and not impact developer productivity?