diff --git a/.artifacts.yml b/.artifacts.yml new file mode 100644 index 00000000000..200f219bbba --- /dev/null +++ b/.artifacts.yml @@ -0,0 +1,3 @@ +version: v1 +defaults: + - publisher diff --git a/.flowconfig b/.flowconfig index bd407c2c03f..d34b00fedc3 100644 --- a/.flowconfig +++ b/.flowconfig @@ -14,6 +14,7 @@ .*/test/integration/render-tests/.* .*/test/build/downstream-flow-fixture/.* .*/_batfish_site/.* +.*/_site/.* [version] 0.77.0 diff --git a/.gitignore b/.gitignore index 09a60ab301c..5a628b3c2ba 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,7 @@ test/integration/**/diff.png src/style-spec/dist/index.js _batfish_site _batfish_tmp +_site yarn-error.log yarn-debug.log npm-debug.log diff --git a/CHANGELOG.md b/CHANGELOG.md index 53997a5e079..6f45e9ca346 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,48 @@ +## 0.50.0 +October 10, 2018 + +### ✨ Features and improvements +* 🎉 Add Custom Layers that can be rendered into with user-provided WebGL code ([#7039](https://github.com/mapbox/mapbox-gl-js/pull/7039)) +* Add WebGL face culling for increased performance ([#7178](https://github.com/mapbox/mapbox-gl-js/pull/7178)) +* Improve speed of expression evaluation ([#7334](https://github.com/mapbox/mapbox-gl-js/pull/7334)) +* Automatically coerce to string for `concat` expression and `text-field` property ([#6190](https://github.com/mapbox/mapbox-gl-js/issues/6190), fixed by [#7280](https://github.com/mapbox/mapbox-gl-js/pull/7280)) +* Add `fill-extrusion-vertical-gradient` property for controlling shading of fill extrusions ([#5768](https://github.com/mapbox/mapbox-gl-js/issues/5768), fixed by [#6841](https://github.com/mapbox/mapbox-gl-js/pull/6841)) +* Add update functionality for images provided via `ImageSource` ([#4050](https://github.com/mapbox/mapbox-gl-js/issues/4050), fixed by [#7342](https://github.com/mapbox/mapbox-gl-js/pull/7342)) (h/t [dcervelli](https://github.com/dcervelli)) + + + +### 🐛 Bug fixes +* **Expressions** + * Fix expressions that use `log2` and `log10` in IE11 ([#7318](https://github.com/mapbox/mapbox-gl-js/issues/7318), fixed by [#7320](https://github.com/mapbox/mapbox-gl-js/pull/7320)) + * Fix `let` expression stripping expected type during parsing ([#7300](https://github.com/mapbox/mapbox-gl-js/issues/7300), fixed by [#7301](https://github.com/mapbox/mapbox-gl-js/pull/7301)) + * Fix superfluous wrapping of literals in `literal` expression ([#7336](https://github.com/mapbox/mapbox-gl-js/issues/7336), fixed by [#7337](https://github.com/mapbox/mapbox-gl-js/pull/7337)) + * Allow calling `to-color` on values that are already of type `Color` ([#7260](https://github.com/mapbox/mapbox-gl-js/pull/7260)) + * Fix `to-array` for empty arrays (([#7261](https://github.com/mapbox/mapbox-gl-js/pull/7261))) + * Fix identity functions for `text-field` when using formatted text ([#7351](https://github.com/mapbox/mapbox-gl-js/pull/7351)) + * Fix coercion of `null` to `0` in `to-number` expression ([#7083](https://github.com/mapbox/mapbox-gl-js/issues/7083), fixed by [#7274](https://github.com/mapbox/mapbox-gl-js/pull/7274)) +* **Canvas source** + * Fix missing repeats of `CanvasSource` when it crosses the antimeridian ([#7273](https://github.com/mapbox/mapbox-gl-js/pull/7273)) + * Fix `CanvasSource` not respecting alpha values set on `canvas` element ([#7302](https://github.com/mapbox/mapbox-gl-js/issues/7302), fixed by [#7309](https://github.com/mapbox/mapbox-gl-js/pull/7309)) +* **Rendering** + * Fix rendering of fill extrusions with really high heights ([#7292](https://github.com/mapbox/mapbox-gl-js/pull/7292)) + * Fix an error where the map state wouldn't return to `loaded` after certain runtime styling changes when there were errored tiles in the viewport ([#7355](https://github.com/mapbox/mapbox-gl-js/pull/7355)) + * Fix errors when rendering symbol layers without symbols ([#7241](https://github.com/mapbox/mapbox-gl-js/issues/7241), fixed by [#7253](https://github.com/mapbox/mapbox-gl-js/pull/7253)) + * Don't fade in symbols with `*-allow-overlap: true` when panning into the viewport ([#7172](https://github.com/mapbox/mapbox-gl-js/issues/7172), fixed by[#7244](https://github.com/mapbox/mapbox-gl-js/pull/7244)) +* **Library** + * Fix disambiguation for `mouseover` event ([#7295](https://github.com/mapbox/mapbox-gl-js/issues/7295), fixed by [#7299](https://github.com/mapbox/mapbox-gl-js/pull/7299)) + * Fix silent failure of `getImage` if an SVG is requested ([#7312](https://github.com/mapbox/mapbox-gl-js/issues/7312), fixed by [#7313](https://github.com/mapbox/mapbox-gl-js/pull/7313)) + * Fix empty control group box shadow ([#7303](https://github.com/mapbox/mapbox-gl-js/issues/7303), fixed by [#7304](https://github.com/mapbox/mapbox-gl-js/pull/7304)) (h/t [Duder-onomy](https://github.com/Duder-onomy)) + * Fixed an issue where a wrong timestamp was sent for Mapbox turnstile events ([#7381](https://github.com/mapbox/mapbox-gl-js/pull/7381)) + * Fixed a bug that lead to attribution not showing up correctly in Internet Explorer ([#3945](https://github.com/mapbox/mapbox-gl-js/issues/3945), fixed by [#7391](https://github.com/mapbox/mapbox-gl-js/pull/7391)) + + ## 0.49.0 September 6, 2018 -## ⚠️ Breaking changes +### ⚠️ Breaking changes * Use `client{Height/Width}` instead of `offset{Height/Width}` for map canvas sizing ([#6848](https://github.com/mapbox/mapbox-gl-js/issues/6848), fixed by [#7128](https://github.com/mapbox/mapbox-gl-js/pull/7128)) -## 🐛 Bug fixes +### 🐛 Bug fixes * Fix [Top Issues list](https://mapbox.github.io/top-issues/#!mapbox/mapbox-gl-js) for mapbox-gl-js ([#7108](https://github.com/mapbox/mapbox-gl-js/issues/7108), fixed by [#7112](https://github.com/mapbox/mapbox-gl-js/pull/7112)) * Fix bug in which symbols with `icon-allow-overlap: true, text-allow-overlap: true, text-optional: false` would show icons when they shouldn't ([#7041](https://github.com/mapbox/mapbox-gl-js/pull/7041)) * Fix bug where the map would not stop at the exact zoom level requested by Map#FlyTo (#7222) ([#7223](https://github.com/mapbox/mapbox-gl-js/pull/7223)) (h/t [benoitbzl](https://github.com/benoitbzl)) @@ -14,8 +52,8 @@ September 6, 2018 * Fix bug in the way AJAX requests load local files on iOS web view ([#6610](https://github.com/mapbox/mapbox-gl-js/pull/6610)) (h/t [oscarfonts](https://github.com/oscarfonts)) * Fix bug in which canvas sources would not render in world wrapped tiles at the edge of the viewport ([#7271]https://github.com/mapbox/mapbox-gl-js/issues/7271), fixed by [#7273](https://github.com/mapbox/mapbox-gl-js/pull/7273)) -## ✨ Features and improvements -Performance updates: +### ✨ Features and improvements +* Performance updates: * Improve time to first render by updating how feature ID maps are transferred to the main thread ([#7110](https://github.com/mapbox/mapbox-gl-js/issues/7110), fixed by [#7132](https://github.com/mapbox/mapbox-gl-js/pull/7132)) * Reduce size of JSON transmitted from worker thread to main thread ([#7124](https://github.com/mapbox/mapbox-gl-js/pull/7124)) * Improve image/glyph atlas packing algorithm ([#7171](https://github.com/mapbox/mapbox-gl-js/pull/7171)) @@ -31,10 +69,10 @@ Performance updates: ## 0.48.0 August 16, 2018 -## ⚠️ Breaking changes +### ⚠️ Breaking changes * Treat tiles that error with status 404 as empty renderable tiles to prevent rendering duplicate features in some sparse tilesets ([#6803](https://github.com/mapbox/mapbox-gl-js/pull/6803)) -## 🐛 Bug fixes +### 🐛 Bug fixes * Fix issue where `text-max-angle` property was being calculated incorrectly internally, causing potential rendering errors when `"text-placement": line` * Require `feature.id` when using `Map#setFeatureState` ([#6974](https://github.com/mapbox/mapbox-gl-js/pull/6974)) * Fix issue with removing the `GeolocateControl` when user location is being used ([#6977](https://github.com/mapbox/mapbox-gl-js/pull/6977)) (h/t [sergei-zelinsky](https://github.com/sergei-zelinsky)) @@ -45,7 +83,7 @@ August 16, 2018 * Relax typing for equality and order expressions ([#6459](https://github.com/mapbox/mapbox-gl-js/issues/6459), fixed by [#6961](https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/6961)) * Fix bug where `queryPadding` for all layers in a source was set by the first layer, causing incorrect querying on other layers and, in some cases, incorrect firing of events associated with individual layers ([#6909](https://github.com/mapbox/mapbox-gl-js/pull/6909)) -## ✨ Features and improvements +### ✨ Features and improvements * Performance Improvements: * Stop unnecessary serialization of symbol source features. ([#7013](https://github.com/mapbox/mapbox-gl-js/pull/7013)) @@ -62,7 +100,7 @@ August 16, 2018 ## 0.47.0 -## ✨ Features and improvements +### ✨ Features and improvements * Add configurable drag pan threshold ([#6809](https://github.com/mapbox/mapbox-gl-js/pull/6809)) (h/t [msbarry](https://github.com/msbarry)) * Add `raster-resampling` raster paint property ([#6411](https://github.com/mapbox/mapbox-gl-js/pull/6411)) (h/t [andrewharvey](https://github.com/andrewharvey)) * Add `symbol-placement: line-center` ([#6821](https://github.com/mapbox/mapbox-gl-js/pull/6821)) @@ -71,7 +109,7 @@ August 16, 2018 * Upgrade geojson-vt to 3.1.4 ([#6942](https://github.com/mapbox/mapbox-gl-js/pull/6942)) * Include link to license in compiled bundle ([#6975](https://github.com/mapbox/mapbox-gl-js/pull/6975)) -## 🐛 Bug fixes +### 🐛 Bug fixes * Use updateData instead of re-creating buffers for repopulated paint arrays ([#6853](https://github.com/mapbox/mapbox-gl-js/pull/6853)) * Fix ScrollZoom handler setting tr.zoom = NaN ([#6924](https://github.com/mapbox/mapbox-gl-js/pull/6924)) - Failed to invert matrix error ([#6486](https://github.com/mapbox/mapbox-gl-js/issues/6486), fixed by [#6924](https://github.com/mapbox/mapbox-gl-js/pull/6924)) diff --git a/_config.yml b/_config.yml deleted file mode 100755 index 9765a6579fa..00000000000 --- a/_config.yml +++ /dev/null @@ -1,3 +0,0 @@ -# When Publisher runs Jekyll (which it always does), it will simply copy this -# source directory to _site. Then Publisher will copy _site to S3. -source: _batfish_site diff --git a/batfish.config.js b/batfish.config.js index db87adfa916..87afb906c93 100644 --- a/batfish.config.js +++ b/batfish.config.js @@ -1,10 +1,12 @@ -const webpack = require('webpack'); +const { webpack } = require('@mapbox/batfish'); +const path = require('path'); module.exports = () => { const config = { siteBasePath: '/mapbox-gl-js', siteOrigin: 'https://www.mapbox.com', pagesDirectory: `${__dirname}/docs/pages`, + outputDirectory: path.join(__dirname, '_site'), stylesheets: [ `${__dirname}/docs/components/site.css`, `${__dirname}/docs/components/prism_highlight.css`, diff --git a/build/set-deploy-env.sh b/build/set-deploy-env.sh deleted file mode 100755 index d1996c6c6fc..00000000000 --- a/build/set-deploy-env.sh +++ /dev/null @@ -1,21 +0,0 @@ -# Establish environment variables based on the branch name. -# -# This is an sh script (instead of Node or bash) because it needs to run in the -# top-level process so the environment variables it creates are available to -# all children processes (e.g. `x && y && z`). `npm run` executes in an `sh` -# environment -- so, sh it is. - -# `git symbolic-ref HEAD` outputs `refs/head/{your-branch-name}`. -branch=`git symbolic-ref HEAD | sed "s/refs\/heads\/\(.*\)/\1/"` - -if [ -z "$DEPLOY_ENV" ] - then - if [ "$branch" = "mb-pages" ] - then - export DEPLOY_ENV=production - else - export DEPLOY_ENV=staging - fi -fi - -echo "DEPLOY_ENV set to $DEPLOY_ENV" diff --git a/docs/components/quickstart.js b/docs/components/quickstart.js index 358c884916f..09abbb7f2ac 100644 --- a/docs/components/quickstart.js +++ b/docs/components/quickstart.js @@ -142,6 +142,24 @@ export default class extends React.Component { directives. For Mapbox, you can use this connect-src directive:

{`connect-src https://*.tiles.mapbox.com https://api.mapbox.com`}
+
+

Mapbox CSS

+

+ The CSS referenced in the Quickstart is used to style DOM elements created by Mapbox code. + Without the CSS, elements like Popups and Markers won't work. +

+

+ Including it with a {''} in the head of the document via the Mapbox CDN is + the simplest and easiest way to provide the CSS, + but it is also bundled in the Mapbox module, meaning that if you have a bundler + that can handle CSS, you can import the CSS from +

{`mapbox-gl/dist/mapbox-gl.css`}
. +

+

+ Note too that if the CSS isn't available by the first render, as soon as the CSS is provided, + the DOM elements that depend on this CSS should recover. +

+
); diff --git a/docs/pages/example/display-and-style-rich-text-labels.html b/docs/pages/example/display-and-style-rich-text-labels.html index f172c106abb..c2b8a32953b 100644 --- a/docs/pages/example/display-and-style-rich-text-labels.html +++ b/docs/pages/example/display-and-style-rich-text-labels.html @@ -1,5 +1,7 @@