elastic / maki

POI Icon Set
Creative Commons Zero v1.0 Universal
4 stars 2 forks source link

Local change to an icon? #10

Open thekofimensah opened 4 years ago

thekofimensah commented 4 years ago

Hi team, I'm looking to make a local change to my kibana instance where I want to adjust one of the icons to something else. For my first test, I'm just trying to change the natural-11 and 15 icons to the cellphone-11/15's svg file in node_modules/@elastic/maki/icons. I would expect that because cellphone-11 svg is already in the correct format, when I type "natural" in the maps app, the cellphone icon would appear but that's not happening. I've tried rebundling kibana via downloading a plugin and refreshing cookies on browser as part of the tests.

I know this is a super rough hack, but is there something I'm missing? If you were to make a local change like this, what files would I need to change? Do I also need to change the spritesheet file? Is there another type of rebundling I need to do? Ideally I could do this without running kibana in dev mode (because I don't understand how it works after a couple hours with the docs) @miukimiu

miukimiu commented 4 years ago

Hello @thekofimensah,

When I worked on adding a new icon I followed the following instructions:

@nickpeihl do we need to regenerate SDF for this icon? How does that work?

SDF icons get generated automatically when the release is published to NPM.

Here's how I test the SDF version of icons locally: 1) yarn prepublish && yarn link in the maki directory 1) In the kibana directory, run yarn kbn bootstrap then yarn link @elastic/maki 1) Start kibana (yarn es snapshot and yarn start)

Originally posted by @nickpeihl in https://github.com/elastic/maki/pull/9#issuecomment-603333904

thomasneirynck commented 3 years ago

The Kibana team is considering an improvement to allow users to plot their own custom icons on a map: https://github.com/elastic/kibana/issues/30738 . Then, users would no longer be restricted to the out-of-the-box icon set.