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
Importe l’icono SVG inline #38
Conversation
src/public/js/constants/resources.js
Outdated
@@ -51,62 +64,62 @@ export const urls = { | |||
// pictos | |||
[INSERTION_PICTO]: { | |||
"production": undefined, | |||
"demo": 'https://cdn.rawgit.com/datalocale/pictoGironde/master/Insertion.svg', | |||
"demo": insertionSvg, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Si les SVG sont versionnés et inlinés, je pense que le système d'URL par NODE_ENV
n'est plus nécessaire pour les SVG
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Du coup je fais juste [INSERTION_PICTO]: insertionSvg,
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C'est une option
Une autre option, c'est de supprimer ces lignes et les constantes (INSERTION_PICTO
) et d'import
er directement les SVG dans les composants qui en ont besoin
Une autre option, c'est de se dire "whatev, c'est pas le sujet, je fais une issue pour ne pas oublier, c'est un travail pour une autre fois"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je te laisse choisir l'option que tu préfères selon ton humeur :-)
@@ -17,7 +22,8 @@ import {EXPENDITURES} from '../../../../shared/js/finance/constants'; | |||
import DownloadSection from "../../../../shared/js/components/gironde.fr/DownloadSection"; | |||
|
|||
|
|||
import {assets, INSERTION_PICTO, ENFANCE_PICTO, HANDICAPES_PICTO, PERSONNES_AGEES_PICTO} from '../../constants/resources'; | |||
import assets from '../../constants/resources'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
La variable assets
est encore utilisée ? C'était un export nommé avant. Et je n'ai plus l'impression que la variable serve encore dans ce fichier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C’est utilisé plus bas dans le fichier car assets
contient les URL vers les données financières et les textes en CSV. On peut le changer mais ça me semble hors de la portée de cette PR.
J'ai ajouté un commentaire, c'est bon pour moi après ça 👍 |
On peut fusionner ou je dois faire des modifs? |
Si tu résous le conflit, c'est bon pour être fusionné 👍 |
Fix #3