Create a separate package for the icons
Opened this issue · 9 comments
The id-tagging-schema project started using the Röntgen icons and with it several OSM editor projects now have pull the icons and package those that are used in presets as part of their apps.
My understanding is, that it is not easy to import just the icon set. In ideditor/schema-builder#75 (comment) the request was made to have a separate package for just the icons.
//cc @enzet: It would be superbly nice to have a separate versioned package of just the pure icons, in order to use them more easily outside of map-machine. Do you think something like that would be feasible?
I created this issue to give this more prominence and track it more easily.
For more details on the technical side @tyrasd, @bryceco, @westnordost and other id-tagging-schema-consumers can give more insights.
Sorry guys, I've been out of the project for a while.
@tordans, thank you for creating the issue. I'm glad that the icon set is living his live now outside of the Map Machine project.
@tyrasd, thank you for writing a readme about the icons and for deliberately placing the license. I was thinking about creating a separate repository for Röntgen icons, however, I switched to the new project, iconscript, which makes the icon set even more generated. So, my final plan was to put everything in three separate repositories:
- Map Machine for the map renderer and mapping scheme,
- Röntgen for SVG templates and iconscript files,
- iconscript for the icon renderer.
As for the icons, it was planned to create a separate web page and make them downloadable through web interface as SVG files.
Is this plan suits you or do you want the final SVG files to be in the GitHub repository in order to easily track commits or something like that?
Is this plan suits you or do you want the final SVG files to be in the GitHub repository in order to easily track commits or something like that?
Generally speaking, a good model for iD/Rapid/GoMap etc. would be to have a Github repo for the icons that follows the structure that https://github.com/rapideditor/temaki uses, especially:
- The icons are SVGs in the repo and viewable and searchable (https://github.com/rapideditor/temaki/tree/main/icons)
- The repo uses semantic versioning with a package json
- The repos release as npm package like https://npm.io/package/@rapideditor/temaki so we can easily include it in other (JS) projects
- Optionally: There is a page to view the icons to make it even easier to pick one like https://rapideditor.github.io/temaki/docs/ – I find this really optional, since IMO at some point we should create a shared page for the tagging-schema that makes it easier to pick icons from all the available sources.
Alternatively, you could look into contributing the icons to temaki and we all use this one place. However, I would start by getting input by the maintainers if some of the icons are not a good fit for temaki; if so, having something separate is easer overall.
Wow, looks pretty complex distribution for just some icons.
For StreetComplete (which also uses iD icons), most convenient would be if there was a publicly accessible directory somewhere from which they could be downloaded by name.
@tordans Sounds good!
- A separate repo with
icons
directory—no problem. - I'll definitely use semantic versioning, however I want to mix it with versions for individual icons, so that
icons
directory may contain, say,ford_v1.svg
andford_v2.svg
icons (or something like that). - I know almost nothing about npm so I have to research this part. If you can provide me with links to some useful information, this will be great.
- Web page is definitely on the roadmap. I even have demo version but it is outdated and doesn't have download button.
Contributing to Temaki doesn't seem to me like good idea, because the overall style of Röntgen is slightly different and the process of creating and changing icons is more complex.
@westnordost I definitely overengineered it. 🥲
Yes, there will be a web site with icons as well as a directory in a GitHub repository.
I know almost nothing about npm …
Me neither but I am told for simple use cases it is straight forward. @tyrasd can maybe give a few hints…
…however I want to mix it with versions for individual icons, so that icons directory may contain, say, ford_v1.svg and ford_v2.svg icons (or something like that).
Personally I would be happy to alway get the one icon from the current package. Instead of using v1,v2 maybe just add a new icon instead. So there could be "tower.svg" and "tower-windows.svg" for a version that shows windows as well…
@tordans Yeah, I thought about it and it seems like semver should deal with this problem. Do I understand it right, that if I want to drastically change the shape of the icon, I should just bump the major version of the whole package and this will be OK?
For example, is it OK if those icons have the same name diving_platform.svg
, but come from versions 1.0, 2.0, 2.1 respectivelly?