With this release, we're adding [a new changelog policy](./CONTRIBUTING.mdchangelog-conventions) to our contribution guidelines.
This release also fixes several long-standing bugs and unintentional rendering behavior with `line-pattern`. The fixes come with a visual change to how patterns added with `line-pattern` scale. Previously, patterns that became larger than the line would be clipped, sometimes distorting the pattern, particularly on mobile and retina devices. Now the pattern will be scaled to fit under all circumstances. [9266](https://github.com/mapbox/mapbox-gl-js/pull/9266) showcases examples of the visual differences. For more information and to provide feedback on this change, see [#9394](https://github.com/mapbox/mapbox-gl-js/pull/9394).
✨ Features
- Add `within` expression for testing whether an evaluated feature lies within a given GeoJSON object ([9352](https://github.com/mapbox/mapbox-gl-js/pull/9352)). - We are aware of an edge case in which points with wrapped coordinates (e.g. longitude -185) are not evaluated properly. See ([#9442](https://github.com/mapbox/mapbox-gl-js/issues/9442)) for more information. - An example of the `within` expression:<br>
`"icon-opacity": ["case", ["==", ["within", "some-polygon"], true], 1,
["==", ["within", "some-polygon"], false], 0]`
- Map API functions such as `easeTo` and `flyTo` now support `padding: PaddingOptions` which lets developers shift a map's center of perspective when building floating sidebars ([8638](https://github.com/mapbox/mapbox-gl-js/pull/8638))
🍏 Improvements
- Results from `queryRenderedFeatures` now have evaluated property values rather than raw expressions ([9198](https://github.com/mapbox/mapbox-gl-js/pull/9198))
- Improve scaling of patterns used in `line-pattern` on all device resolutions and pixel ratios ([9266](https://github.com/mapbox/mapbox-gl-js/pull/9266))
- Slightly improve GPU memory footprint ([9377](https://github.com/mapbox/mapbox-gl-js/pull/9377))
- `LngLatBounds.extend` is more flexible because it now accepts objects with `lat` and `lon` properties as well as arrays of coordinates ([9293](https://github.com/mapbox/mapbox-gl-js/pull/9293))
- Reduce bundle size and improve visual quality of `showTileBoundaries` debug text ([9267](https://github.com/mapbox/mapbox-gl-js/pull/9267))
🐞 Bug fixes
- Correctly adjust patterns added with `addImage(id, image, pixelRatio)` by the asset pixel ratio, not the device pixel ratio ([9372](https://github.com/mapbox/mapbox-gl-js/pull/9372))
- Allow needle argument to `in` expression to be false ([9295](https://github.com/mapbox/mapbox-gl-js/pull/9295))
- Fix exception thrown when trying to set `feature-state` for a layer that has been removed, fixes [8634](https://github.com/mapbox/mapbox-gl-js/issues/8634) ([#9305](https://github.com/mapbox/mapbox-gl-js/pull/9305))
- Fix a bug where maps were not displaying inside elements with `dir=rtl` ([9332](https://github.com/mapbox/mapbox-gl-js/pull/9332))
- Fix a rendering error for very old versions of Chrome (ca. 2016) where text would appear much bigger than intended ([9349](https://github.com/mapbox/mapbox-gl-js/pull/9349))
- Prevent exception resulting from `line-dash-array` of empty length ([9385](https://github.com/mapbox/mapbox-gl-js/pull/9385))
- Fix a bug where `icon-image` expression that evaluates to an empty string (`''`) produced a warning ([9380](https://github.com/mapbox/mapbox-gl-js/pull/9380))
- Fix a bug where certain `popup` methods threw errors when accessing the container element before it was created, fixes [9429](https://github.com/mapbox/mapbox-gl-js/issues/9429)([#9433](https://github.com/mapbox/mapbox-gl-js/pull/9433))