-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Merge "mapbox-gl-style-spec" repository into this repository #3946
Conversation
- changes the interface of functions to `f(globals, feature)` - removes the "assert" function - improves perf - pins to an updated style spec - bumps to the v2.1.0
V8 is unable to evaluate large disjunctions, failing with "RangeError: Maximum call stack size exceeded". Fixes #1782
This reverts commit e37aa5f. Adding validation of ramp stops was good in spirit, but it breaks some v8 styles. Reverting until v9 where we can make backwards incompatible changes.
Revert "prevent ramp from having duplicate stops"
Hmm... what if we stuck a check for
Not sure if this is actually any better than option 2, though. |
Thanks for raising these concerns @anandthakker @tmcw. You've brought to light some points I hadn't considered. My plan of attack:
|
js/style-spec/package.json
Outdated
} | ||
} | ||
], | ||
"unassertify", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bad trailing comma.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed 👍
cc80268
to
09c8ad3
Compare
Integration in gl-native looks good: mapbox/mapbox-gl-native@c9f3850. |
This turned out to add significant complexity to the gl-native implementation, and never took effect in gl-js due to a bug (#3717). Removing it due to the complexity it would add to gl-native and other implementations, and the following additional rationales: * As a general principle: explicit is better than implicit. * Most users will not be constructing functions by hand anyway. For those that do: * Requiring `"type": "categorical"` is not an undue burden, especially when coupled with a hinting mechanism in the validator as implemented here. * Implicitly supplying `"type": "categorical"` for string domain values introduces a potentially surprising difference between `"stops": [["1", 1], ["2", 2]]` and `"stops": [[1, 1], [2, 2]]`.
643e9fa
to
293f49d
Compare
# Conflicts: # .gitignore # .npmignore # package.json
It’s redundant to style spec docs & prone to becoming out-of-date
293f49d
to
ff6da37
Compare
This PR merges the "mapbox-gl-style-spec" repository into this repository.
fixes #3794
Todo Before Merging
package.json
& wire GL JS up to bundled style spec versionbuild-style-spec-docs
script intobuild-docs
scriptsbuild-style-spec
script in favor of custom browserify middlewaremapbox-gl-style-spec
package to be published from this repo, rename npm package to use new namespace (“@mapbox/…”), write docs on when/how to publish a new style spec versionbuild-style-spec-api-docs
script in favor of JSDoc flow, ensure style spec modules don't show up in GL JS API docsbin
commandspackage.json
mapbox-gl-js
mapbox-gl-style-spec
update docs/_layouts/docs.html
with new style spec linksTodo Immediately After Merging
@mapbox/mapbox-gl-style-spec
npm packagemapbox-gl-style-spec
npm package as deprecatedmapbox-gl-style-spec
issues & PRsmapbox-gl-style-spec
github repo as deprecatedmaster
andmb-pages
mapbox-gl-style-spec
websiteFollow-Up PR
mapbox-gl
to this repomapbox-gl
mapbox-gl
mapbox-gl-js
website tomapbox-gl
website