Skip to content
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

Refactor the sprite interface and documentation #146

Open
keichan34 opened this issue Dec 20, 2022 · 0 comments
Open

Refactor the sprite interface and documentation #146

keichan34 opened this issue Dec 20, 2022 · 0 comments

Comments

@keichan34
Copy link
Contributor

Is your feature request related to a problem? Please describe.

Currently, the sprite interface is only available in charites build (#143 adds support for charites serve), and it is only available using command line options. Additionally, there is some special logic with the current sprite property and trying to parse its URL when building sprites -- my proposed solution would remove the need for that logic.

Describe the solution you'd like
I propose a unified interface for specifying sprite build options in style.yml:

version: 8
metadata:
  "charites:sprites":
    directory: ./icons
    output: ./sprite
    pixel_ratios: [ 1, 2 ]

This is compatible with the Mapbox Style Specification, but probably should be stripped out when compiling the style.json file.

Additionally, a separate page should be added to the documentation regarding the facilities Charites provides for building spritesheets.

Describe alternatives you've considered

  • Automatically detecting an icons directory in the same directory as the style.yml file
    • What happens when you don't want to build sprites? --no-sprites ?
    • Probably this could be combined with the sprite build options for a smooth user experience?

Additional context
Documentation is currently lacking: see #115

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant