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

Force style layer ids to lower case when creating layer templates #16

Open
aparlato opened this issue Oct 17, 2022 · 0 comments
Open

Force style layer ids to lower case when creating layer templates #16

aparlato opened this issue Oct 17, 2022 · 0 comments

Comments

@aparlato
Copy link
Contributor

I just went to use the new create-layer-templates script on a repo and ran into issues around layer id capitalization. This produced unexpected results where inconsistent capitalization across otherwise identical ids in styles failed equality checks to signal the same layer id was found but still overwrote outputted layer js files. I resolved this by changing all style layer ids to lower case in those styles and rerunning the script, but because the root cause was hard to pick out, we should have some handling in the script itself for these scenarios.

Capitalizing layer ids is never best practice, but we could account for this by forcing all style layers to lower case before breaking the layers out and comparing them to each other by style id. We should warn in the console when we do this.

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