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

Improve and clean up style-spec types #11520

Merged
merged 8 commits into from
Feb 17, 2022
Merged

Improve and clean up style-spec types #11520

merged 8 commits into from
Feb 17, 2022

Conversation

mourner
Copy link
Member

@mourner mourner commented Feb 17, 2022

A part of #11426.

  • Add Flow typing to previously untyped style-spec files (that are used by GL JS): deref.js, diff.js, empty.js, group_by_layout.js, validate_style.min.js
  • Remove legacy constants validation from style-spec. Support for root style constants was removed at least 7 years ago, so it's no longer relevant and will simply be ignored from now on.
  • Remove legacy declass.js as it's been unused for many years, and isn't even a part of the migrate function.
  • Simplify empty.js that generates an empty style — it's still covered with tests so there's no need to be worried if we bump the style spec version.
  • As a result of all these changes, reduce the gzipped bundle size by 214 bytes.

Launch Checklist

  • briefly describe the changes in this PR
  • write tests for all new functionality
  • document any changes to public APIs
  • manually test the debug page
  • tagged @mapbox/map-design-team if this PR includes style spec API or visual changes
  • apply changelog label ('bug', 'feature', 'docs', etc) or use the label 'skip changelog'

@mourner mourner added the skip changelog Used for PRs that do not need a changelog entry label Feb 17, 2022
@mourner mourner merged commit 83b8d8f into main Feb 17, 2022
@mourner mourner deleted the flow/style-spec-cleanup branch February 17, 2022 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip changelog Used for PRs that do not need a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants