Skip to content

Commit

Permalink
squash
Browse files Browse the repository at this point in the history
  • Loading branch information
peterqliu committed Apr 2, 2019
2 parents ddff569 + 79c3b98 commit 91a250f
Show file tree
Hide file tree
Showing 520 changed files with 19,078 additions and 11,391 deletions.
5 changes: 4 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,11 @@ jobs:
name: Build
command: BENCHMARK_VERSION="${CIRCLE_TAG:-$CIRCLE_BRANCH} $(git rev-parse --short=7 HEAD)" yarn run build-benchmarks
- run:
name: Upload
name: Upload benchmark
command: aws s3 cp --acl public-read --content-type application/javascript bench/versions/benchmarks_generated.js s3://mapbox-gl-js/${CIRCLE_TAG:-$CIRCLE_BRANCH}/benchmarks.js
- run:
name: Upload source maps
command: aws s3 cp --acl public-read --content-type application/javascript bench/versions/benchmarks_generated.js.map s3://mapbox-gl-js/${CIRCLE_TAG:-$CIRCLE_BRANCH}/benchmarks.js.map

deploy-release:
<<: *defaults
Expand Down
6 changes: 5 additions & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[ignore]
.*/node_modules/@mapbox/jsonlint-lines-primitives/.*
.*/node_modules/jsonlint-lines/.*
.*/node_modules/stylelint/.*
.*/node_modules/unflowify/.*
.*/node_modules/flow-coverage-report/.*
Expand All @@ -17,4 +18,7 @@
.*/_site/.*

[version]
0.85.0
0.95.1

[options]
server.max_workers=4
3 changes: 2 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

<!-- Thanks for the PR! Feel free to add or remove items from the checklist. -->

<!-- If your PR affects documentation relevant to the currently released version, please use `mb-pages` as the base branch. See https://github.com/mapbox/mapbox-gl-js/blob/master/docs/README.md#committing-and-publishing-documentation -->
<!-- If your PR affects documentation relevant to the currently released version, please use `publisher-production` as the base branch. See https://github.com/mapbox/mapbox-gl-js/blob/master/docs/README.md#committing-and-publishing-documentation -->

- [ ] briefly describe the changes in this PR
- [ ] write tests for all new functionality
- [ ] document any changes to public APIs
- [ ] post benchmark scores
- [ ] manually test the debug page
- [ ] tagged `@mapbox/studio` and/or `@mapbox/maps-design` if this PR includes style spec changes
- [ ] tagged `@mapbox/gl-native` if this PR includes shader changes or needs a native port
13 changes: 4 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/rollup/build/
/docs/components/api.json
/dist/
/docs/pages/dist/mapbox-gl-dev.js
/docs/pages/dist/mapbox-gl.js
/docs/pages/dist/mapbox-gl-unminified.js
/docs/pages/dist/
/docs/img/dist/
*.js.map
node_modules
package-lock.json
Expand All @@ -12,12 +11,8 @@ coverage
flow-coverage
.DS_Store
.nyc_output
bench/versions/benchmarks_generated.js
bench/versions/benchmarks_view_generated.js
bench/styles/benchmarks_generated.js
bench/styles/benchmarks_view_generated.js
debug/access_token_generated.js
debug/style_property_editor_generated.js
*_generated.js
*_generated.js.map
test/integration/**/index*.html
test/integration/**/actual.png
test/integration/**/actual.json
Expand Down
1 change: 1 addition & 0 deletions .publisher.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
subdomain: docs
70 changes: 69 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,71 @@
## 0.54.0-beta.1

### Breaking changes

- Turned `localIdeographFontFamily` map option on by default. This may change how CJK labels are rendered, but dramatically improves performance of CJK maps (because the browser no longer needs to download heavy amounts of font data from the server). Add `localIdeographyFontFamily: false` to turn this off. [#8008](https://github.com/mapbox/mapbox-gl-js/pull/8008)
- Added `Popup` `maxWidth` option, set to `"240px"` by default. [#7906](https://github.com/mapbox/mapbox-gl-js/pull/7906)

### Major features

- Added support for updating and animating style images. [#7999](https://github.com/mapbox/mapbox-gl-js/pull/7999)
- Added support for generating style images dynamically (e.g. for drawing icons based on feature properties). [#7987](https://github.com/mapbox/mapbox-gl-js/pull/7987)
- Added antialiasing support for custom layers. [#7821](https://github.com/mapbox/mapbox-gl-js/pull/7821)
- Added a new `mapbox-gl-csp.js` bundle for strict CSP environments where `worker-src: blob` is disallowed. [#8044](https://github.com/mapbox/mapbox-gl-js/pull/8044)

### Minor features and improvements

- Improved performance of fill extrusions. [#7821](https://github.com/mapbox/mapbox-gl-js/pull/7821)
- Improved performance of symbol layers. [#7967](https://github.com/mapbox/mapbox-gl-js/pull/7967)
- Slightly improved rendering performance in general. [#7969](https://github.com/mapbox/mapbox-gl-js/pull/7969)
- Slightly improved performance of HTML markers. [#8018](https://github.com/mapbox/mapbox-gl-js/pull/8018)
- Improved diffing of styles with `"visibility": "visible"`. [#8005](https://github.com/mapbox/mapbox-gl-js/pull/8005)
- Improved zoom buttons to grey out when reaching min/max zoom. [#8023](https://github.com/mapbox/mapbox-gl-js/pull/8023)
- Added a title to fullscreen control button. [#8012](https://github.com/mapbox/mapbox-gl-js/pull/8012)
- Added `rel="noopener"` attributes to links that lead to external websites (such as Mapbox logo and OpenStreetMap edit link) for improved security. [#7914](https://github.com/mapbox/mapbox-gl-js/pull/7914)
- Added tile size info when `map.showTileBoundaries` is turned on. [#7963](https://github.com/mapbox/mapbox-gl-js/pull/7963)
- Significantly improved load times of the benchmark suite. [#8066](https://github.com/mapbox/mapbox-gl-js/pull/8066)

### Bug fixes

- Fixed a memory leak when calling `source.setData(url)` many times. [#8035](https://github.com/mapbox/mapbox-gl-js/pull/8035)
- Fixed a bug where marker lost focus when dragging. [#7799](https://github.com/mapbox/mapbox-gl-js/pull/7799)
- Fixed a bug where `map.getCenter()` returned a reference to an internal `LngLat` object instead of cloning it, leading to potential mutability bugs. [#7922](https://github.com/mapbox/mapbox-gl-js/pull/7922)
- Fixed a bug where default HTML marker positioning was slightly off. [#8074](https://github.com/mapbox/mapbox-gl-js/pull/8074)
- Fixed a bug where adding a fill extrusion layer for non-polygon layers would lead to visual artifacts. [#7685](https://github.com/mapbox/mapbox-gl-js/pull/7685)
- Fixed intermittent Flow failures on CI. [#8061](https://github.com/mapbox/mapbox-gl-js/pull/8061)

## 0.53.1

## Bug fixes
* Turn off telemetry for Mapbox Atlas ([#7945](https://github.com/mapbox/mapbox-gl-js/pull/7945))
* Fix order of 3D features in query results (fix #7883) ([#7953](https://github.com/mapbox/mapbox-gl-js/pull/7953))
* Fix RemovePaintState benchmarks ([#7930](https://github.com/mapbox/mapbox-gl-js/pull/7930))

## 0.53.0

## Features and improvements
* Enable `fill-extrusion` querying with ray picking ([#7499](https://github.com/mapbox/mapbox-gl-js/pull/7499))
* Add `clusterProperties` option for aggregated cluster properties ([#2412](https://github.com/mapbox/mapbox-gl-js/issues/2412), fixed by [#7584](https://github.com/mapbox/mapbox-gl-js/pull/7584))
* Allow initial map bounds to be adjusted with `fitBounds` options. ([#7681](https://github.com/mapbox/mapbox-gl-js/pull/7681)) (h/t [elyobo](https://github.com/elyobo))
* Remove popups on `Map#remove` ([#7749](https://github.com/mapbox/mapbox-gl-js/pull/7749)) (h/t [andycalder](https://github.com/andycalder))
* Add `Map#removeFeatureState` ([#7761](https://github.com/mapbox/mapbox-gl-js/pull/7761))
* Add `number-format` expression ([#7626](https://github.com/mapbox/mapbox-gl-js/pull/7626))
* Add `symbol-sort-key` style property ([#7678](https://github.com/mapbox/mapbox-gl-js/pull/7678))

## Bug fixes
* Upgrades Earcut to fix a rare bug in rendering polygons that contain a coincident chain of holes ([#7806](https://github.com/mapbox/mapbox-gl-js/issues/7806), fixed by [#7878](https://github.com/mapbox/mapbox-gl-js/pull/7878))
* Allow `file://` protocol in XHR requests for Cordova/Ionic/etc ([#7818](https://github.com/mapbox/mapbox-gl-js/pull/7818))
* Correctly handle WebP images in Edge 18 ([#7687](https://github.com/mapbox/mapbox-gl-js/pull/7687))
* Fix bug which mistakenly requested WebP images in browsers that do not support WebP (#7817) ([#7819](https://github.com/mapbox/mapbox-gl-js/pull/7819))
* Fix images not being aborted when dequeued ([#7655](https://github.com/mapbox/mapbox-gl-js/pull/7655))
* Fix DEM layer memory leak ([#7690](https://github.com/mapbox/mapbox-gl-js/issues/7690), fixed by [#7691](https://github.com/mapbox/mapbox-gl-js/pull/7691))
* Set correct color state before rendering custom layer ([#7711](https://github.com/mapbox/mapbox-gl-js/pull/7711))
* Set `LngLat.toBounds()` default radius to 0 ([#7722](https://github.com/mapbox/mapbox-gl-js/issues/7722), fixed by [#7723](https://github.com/mapbox/mapbox-gl-js/pull/7723)) (h/t [cherniavskii](https://github.com/cherniavskii))
* Fix race condition in `feature-state` dependent layers ([#7523](https://github.com/mapbox/mapbox-gl-js/issues/7523), fixed by [#7790](https://github.com/mapbox/mapbox-gl-js/pull/7790))
* Prevent `map.repaint` from mistakenly enabling continuous repaints ([#7667](https://github.com/mapbox/mapbox-gl-js/pull/7667))
* Prevent map shaking while zooming in on raster tiles ([#7426](https://github.com/mapbox/mapbox-gl-js/pull/7426))
* Fix query point translation for multi-point geometry ([#6833](https://github.com/mapbox/mapbox-gl-js/issues/6833), fixed by [#7581](https://github.com/mapbox/mapbox-gl-js/pull/7581))

## 0.52.0

# Breaking changes
Expand Down Expand Up @@ -39,7 +107,7 @@ November 7, 2018
* Add tooltips for navigation controls ([#7373](https://github.com/mapbox/mapbox-gl-js/pull/7373))
* Show attribution only for used sources ([#7384](https://github.com/mapbox/mapbox-gl-js/pull/7384))
* Add telemetry event to log map loads ([#7431](https://github.com/mapbox/mapbox-gl-js/pull/7431))
* **Tighten style validation**
* **Tighten style validation**
* Disallow expressions as stop values ([#7396](https://github.com/mapbox/mapbox-gl-js/pull/7396))
* Disallow `feature-state` expressions in filters ([#7366](https://github.com/mapbox/mapbox-gl-js/pull/7366))

Expand Down
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[<img width="400" alt="Mapbox" src="docs/pages/assets/logo.png">](https://www.mapbox.com/)

**Mapbox GL JS** is a JavaScript library for interactive, customizable vector maps on the web. It takes map styles that conform to the
[Mapbox Style Specification](https://www.mapbox.com/mapbox-gl-js/style-spec), applies them to vector tiles that
[Mapbox Style Specification](https://docs.mapbox.com/mapbox-gl-js/style-spec/), applies them to vector tiles that
conform to the [Mapbox Vector Tile Specification](https://github.com/mapbox/vector-tile-spec), and renders them using
WebGL.

Mapbox GL JS is part of the [cross-platform Mapbox GL ecosystem](https://www.mapbox.com/maps/), which also includes
compatible native SDKs for applications on [Android](https://www.mapbox.com/android-sdk/),
[iOS](https://www.mapbox.com/ios-sdk/), [macOS](http://mapbox.github.io/mapbox-gl-native/macos),
compatible native SDKs for applications on [Android](https://docs.mapbox.com/android/maps/overview/),
[iOS](https://docs.mapbox.com/ios/maps/overview/), [macOS](http://mapbox.github.io/mapbox-gl-native/macos),
[Qt](https://github.com/mapbox/mapbox-gl-native/tree/master/platform/qt), and [React Native](https://github.com/mapbox/react-native-mapbox-gl/). Mapbox provides building blocks to add location features like maps, search, and navigation into any experience you
create. To get started with GL JS or any of our other building blocks,
[sign up for a Mapbox account](https://www.mapbox.com/signup/).
Expand All @@ -16,13 +16,12 @@ In addition to GL JS, this repository contains code, issues, and test fixtures t
native SDKs. For code and issues specific to the native SDKs, see the
[mapbox/mapbox-gl-native](https://github.com/mapbox/mapbox-gl-native/) repository.

- [Getting started with Mapbox GL JS](https://www.mapbox.com/mapbox-gl-js/api/)
- [Tutorials](https://www.mapbox.com/help/tutorials/#web-apps)
- [API documentation](https://www.mapbox.com/mapbox-gl-js/api/)
- [Examples](https://www.mapbox.com/mapbox-gl-js/examples/)
- [Style documentation](https://www.mapbox.com/mapbox-gl-js/style-spec/)
- [Getting started with Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js/overview/)
- [Tutorials](https://docs.mapbox.com/help/tutorials/#web-apps)
- [API documentation](https://docs.mapbox.com/mapbox-gl-js/api/)
- [Examples](https://docs.mapbox.com/mapbox-gl-js/examples/)
- [Style documentation](https://docs.mapbox.com/mapbox-gl-js/style-spec/)
- [Open source styles](https://github.com/mapbox/mapbox-gl-styles)
- [Roadmap](https://www.mapbox.com/mapbox-gl-js/roadmap/)
- [Contributor documentation](https://github.com/mapbox/mapbox-gl-js/blob/master/CONTRIBUTING.md)

[<img width="981" alt="Mapbox GL gallery" src="docs/pages/assets/gallery.png">](https://www.mapbox.com/gallery/)
Expand Down
45 changes: 38 additions & 7 deletions batfish.config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
const { webpack } = require('@mapbox/batfish');
const webpack = require('webpack');
const mapboxAssembly = require('@mapbox/mbx-assembly');
const path = require('path');

module.exports = () => {
const config = {
siteBasePath: '/mapbox-gl-js',
siteOrigin: 'https://www.mapbox.com',
siteOrigin: 'https://docs.mapbox.com',
pagesDirectory: `${__dirname}/docs/pages`,
outputDirectory: path.join(__dirname, '_site'),
browserslist: mapboxAssembly.browsersList,
postcssPlugins: mapboxAssembly.postcssPipeline.plugins,
stylesheets: [
require.resolve('@mapbox/mbx-assembly/dist/assembly.css'),
require.resolve('@mapbox/dr-ui/css/docs-prose.css'),
`${__dirname}/docs/components/site.css`,
`${__dirname}/docs/components/prism_highlight.css`,
`${__dirname}/vendor/dotcom-page-shell/page-shell-styles.css`
require.resolve('@mapbox/dr-ui/css/prism.css'),
`${__dirname}/vendor/docs-page-shell/page-shell-styles.css`
],
applicationWrapperPath: `${__dirname}/docs/components/application-wrapper.js`,
webpackLoaders: [
Expand All @@ -30,17 +35,43 @@ module.exports = () => {
],
inlineJs: [
{
filename: `${__dirname}/vendor/dotcom-page-shell/page-shell-script.js`
filename: `${__dirname}/vendor/docs-page-shell/page-shell-script.js`
}
],
jsxtremeMarkdownOptions: {
wrapper: path.join(__dirname, './docs/components/markdown-page-shell.js'),
rehypePlugins: [
require('@mapbox/dr-ui/plugins/add-links-to-headings'),
require('@mapbox/dr-ui/plugins/make-table-scroll')
]
},
dataSelectors: {
examples: ({pages}) => {
return pages
.filter(({path, frontMatter}) => /\/example\//.test(path) && frontMatter.tags)
.map(({frontMatter}) => frontMatter);
.map(example => {
return {
path: example.path,
title: example.frontMatter.title,
description: example.frontMatter.description,
tags: example.frontMatter.tags,
pathname: example.frontMatter.pathname
};
});
},
listSubfolders: data => {
const folders = data.pages
.filter(file => {
return file.path.split('/').length === 4;
})
.map(folder => {
return folder;
});
return folders;
}
},
devBrowserslist: false
devBrowserslist: false,
babelInclude: ['documentation']
};

// Local builds treat the `dist` directory as static assets, allowing you to test examples against the
Expand Down
18 changes: 5 additions & 13 deletions bench/benchmarks/expressions.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,50 +71,42 @@ class ExpressionBenchmark extends Benchmark {
}
}

class FunctionCreate extends ExpressionBenchmark {
export class FunctionCreate extends ExpressionBenchmark {
bench() {
for (const {rawValue, propertySpec} of this.data) {
createFunction(rawValue, propertySpec);
}
}
}

class FunctionEvaluate extends ExpressionBenchmark {
export class FunctionEvaluate extends ExpressionBenchmark {
bench() {
for (const {compiledFunction} of this.data) {
compiledFunction.evaluate({zoom: 0});
}
}
}

class FunctionConvert extends ExpressionBenchmark {
export class FunctionConvert extends ExpressionBenchmark {
bench() {
for (const {rawValue, propertySpec} of this.data) {
convertFunction(rawValue, propertySpec);
}
}
}

class ExpressionCreate extends ExpressionBenchmark {
export class ExpressionCreate extends ExpressionBenchmark {
bench() {
for (const {rawExpression, propertySpec} of this.data) {
createPropertyExpression(rawExpression, propertySpec);
}
}
}

class ExpressionEvaluate extends ExpressionBenchmark {
export class ExpressionEvaluate extends ExpressionBenchmark {
bench() {
for (const {compiledExpression} of this.data) {
compiledExpression.evaluate({zoom: 0});
}
}
}

export default [
FunctionCreate,
FunctionConvert,
FunctionEvaluate,
ExpressionCreate,
ExpressionEvaluate
];
Loading

0 comments on commit 91a250f

Please sign in to comment.