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

Update character data to Unicode 16.0.0 #4536

Merged
merged 5 commits into from
Aug 11, 2024
Merged

Conversation

1ec5
Copy link
Contributor

@1ec5 1ec5 commented Aug 10, 2024

The subset of Unicode character data in this repository hasn’t been updated since Unicode 12.0.0 in March 2019 (mapbox/mapbox-gl-js#8158). This PR updates it to Unicode 16.0.0, which will be released in about a month’s time. (All code points are already frozen.)

Since GL JS doesn’t yet support characters outside the Basic Multilingual Plane (#2307), the practical impact of this PR is negligible. The only practical impact is that this fixes the issue where an Arabic Extended-B character in a text-field prevented the surrounding Arabic text from being laid out from right to left. None of the characters in this code block are supported by mapbox-gl-rtl-text, so any affected character would continue to appear as a blank space. However, keeping this file up to date will facilitate any future support for characters outside the BMP. 😊

Launch Checklist

  • Confirm your changes do not include backports from Mapbox projects (unless with compliant license) - if you are not sure about this, please ask!
  • Briefly describe the changes in this PR.
  • Link to related issues.
  • Include before/after visuals or gifs if this PR includes visual changes.
  • Write tests for all new functionality.
  • Document any changes to public APIs.
  • Post benchmark scores.
  • Add an entry to CHANGELOG.md under the ## main section.

@codecov-commenter
Copy link

codecov-commenter commented Aug 10, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 87.63%. Comparing base (c207ccb) to head (9bde2c5).

Files Patch % Lines
src/util/script_detection.ts 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4536      +/-   ##
==========================================
+ Coverage   87.61%   87.63%   +0.01%     
==========================================
  Files         246      246              
  Lines       33451    33454       +3     
  Branches     2220     2217       -3     
==========================================
+ Hits        29309    29317       +8     
+ Misses       3125     3117       -8     
- Partials     1017     1020       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@HarelM
Copy link
Collaborator

HarelM commented Aug 11, 2024

Is there a way to cover this change with tests?
Also a chengelog entry would be welcomed here.
Thanks!

@1ec5
Copy link
Contributor Author

1ec5 commented Aug 11, 2024

Is there a way to cover this change with tests?

Maybe, how specific should the tests be? I hesitated to add any tests of the code block entries because that would result in hard-coding the code blocks in a second place. But I guess we could verify that each entry forms a range (end is greater than start)?

By the way, I would’ve written a script to generate this file automatically a long time ago, but the tricky part is automatically uncommenting each entry that is used somewhere in the codebase. Since Unicode only updates roughly annually, I haven’t bothered so far.

Also a chengelog entry would be welcomed here.

Ah OK, the contributing guide said not to add a changelog entry for internal tech debt updates, but I can add one.

@HarelM
Copy link
Collaborator

HarelM commented Aug 11, 2024

It has a change for Arabic users if I understand correctly, this should be the relevant part in the changelog.
A test that covers this change in terms of public API, code flow, something, IDK, even render test with special character.
Unless this doesn't change the behavior at all but only updated a "dependency".
In that case no test or changelog are needed.

@1ec5
Copy link
Contributor Author

1ec5 commented Aug 11, 2024

I added a trivial test of the function that determines whether text requires complex text shaping, as well as a test that entries in the Unicode code block table follow the expected format.

Copy link
Collaborator

@HarelM HarelM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

THANKS!

@HarelM HarelM merged commit 1a834cb into maplibre:main Aug 11, 2024
15 checks passed
@HarelM
Copy link
Collaborator

HarelM commented Aug 11, 2024

Bummber, merged it before a proper check of the place in the changelog, can you open a PR to fix this, i.e. move the changelog entry up to be under "main" branch?

@1ec5
Copy link
Contributor Author

1ec5 commented Aug 11, 2024

Oops, my bad, so that’s why there was a merge conflict. 😅 #4540

@1ec5 1ec5 deleted the unicode15.1 branch August 11, 2024 19:52
alexandresoro pushed a commit to alexandresoro/ouca that referenced this pull request Sep 22, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [maplibre-gl](https://maplibre.org/) ([source](https://github.com/maplibre/maplibre-gl-js)) | dependencies | minor | [`4.5.2` -> `4.7.0`](https://renovatebot.com/diffs/npm/maplibre-gl/4.5.2/4.7.0) |

---

### Release Notes

<details>
<summary>maplibre/maplibre-gl-js (maplibre-gl)</summary>

### [`v4.7.0`](https://github.com/maplibre/maplibre-gl-js/blob/HEAD/CHANGELOG.md#470)

[Compare Source](maplibre/maplibre-gl-js@v4.6.0...v4.7.0)

##### ✨ Features and improvements

-   Support multiple layers in `map.on`, `map.once` and `map.off` methods ([#&#8203;4570](maplibre/maplibre-gl-js#4570))
-   Ensure GeoJSON cluster sources emit a console warning if `maxzoom` is less than or equal to `clusterMaxZoom` since in this case you may see unexpected results. ([#&#8203;4604](maplibre/maplibre-gl-js#4604))

##### 🐞 Bug fixes

-   Heatmap Fix for 3D terrain ([#&#8203;4571](maplibre/maplibre-gl-js#4571))
-   Fix Map#off to not remove listener with layer(s) registered with Map#once ([#&#8203;4592](maplibre/maplibre-gl-js#4592))
-   Improve types a bit for `addSource` and `getSource` ([#&#8203;4616](maplibre/maplibre-gl-js#4616))
-   Fix the color near the horizon when terrain is enabled without any sky ([#&#8203;4607](maplibre/maplibre-gl-js#4607))
-   Fix bug where `fitBounds` and `cameraForBounds` would not display across the 180th meridian (antimeridian)
-   Fix white flickering on map resize ([#&#8203;4158](maplibre/maplibre-gl-js#4158))
-   Fixed a performance regression related to symbol placement ([#&#8203;4599](maplibre/maplibre-gl-js#4599))
-   Fix a bug where cloning a Transform instance didn't include the `lngRange`. This caused a bug where
    using `transformCameraUpdate` caused the `maxBounds` to stop working just for east/west bounds. ([#&#8203;4625](maplibre/maplibre-gl-js#4625))

### [`v4.6.0`](https://github.com/maplibre/maplibre-gl-js/blob/HEAD/CHANGELOG.md#460)

[Compare Source](maplibre/maplibre-gl-js@v4.5.2...v4.6.0)

##### ✨ Features and improvements

-   Prefer local glyph rendering for all CJKV characters, not just those in the CJK Unified Ideographs, Hiragana, Katakana, and Hangul Syllables blocks. ([#&#8203;4560](maplibre/maplibre-gl-js#4560)))

##### 🐞 Bug fixes

-   Fix right-to-left layout of labels that contain characters in the Arabic Extended-B code block. ([#&#8203;4536](maplibre/maplibre-gl-js#4536))
-   Fix 3D map freezing when camera is adjusted against map bounds. ([#&#8203;4537](maplibre/maplibre-gl-js#4537))
-   Fix `getStyle()` to return a clone so the object cannot be internally changed ([#&#8203;4488](maplibre/maplibre-gl-js#4488))
-   Fix issues with setting sky to `undefined` ([#&#8203;4587](maplibre/maplibre-gl-js#4587)))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC40Ny4wIiwidXBkYXRlZEluVmVyIjoiMzguODYuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIl19-->

Reviewed-on: https://git.tristess.app/alexandresoro/ouca/pulls/52
Reviewed-by: Alexandre Soro <[email protected]>
Co-authored-by: renovate <[email protected]>
Co-committed-by: renovate <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants