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

Fix children not retained when wrapped #5271

Merged
merged 3 commits into from
Dec 27, 2024

Conversation

ibesora
Copy link
Collaborator

@ibesora ibesora commented Dec 26, 2024

This PR fixes #5248

Looking at it, when globe is being used, some tileIDs coordinates are wrapped and we were only using unwrapped tile ids to check if a parent tile had loaded children. The fix here is just to add a check for the canonical key, in addition to the existing one.

Before

Screen.Recording.2024-12-26.at.18.27.33.mov

After

Screen.Recording.2024-12-26.at.18.29.21.mov

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.

Copy link

codecov bot commented Dec 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.81%. Comparing base (58f3a82) to head (6c0807d).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5271   +/-   ##
=======================================
  Coverage   91.81%   91.81%           
=======================================
  Files         282      282           
  Lines       38898    38898           
  Branches     6819     6823    +4     
=======================================
+ Hits        35715    35716    +1     
  Misses       3055     3055           
+ Partials      128      127    -1     

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

@@ -851,6 +852,43 @@ describe('SourceCache#update', () => {
sourceCache.onAdd(undefined);
}));

test('retains children tiles for pending parents', () => new Promise<void>(done => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a way to avoid "done" in tests? I'm trying to remove usage of those as best as I can, but it's progressing slow, so I want to at least avoid adding more...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed! I just copied what other tests were doing but it seems it's not needed. I've checked that the test passes and fails correctly without it

@ibesora ibesora force-pushed the ib/fix-children-not-retained branch from 985d552 to 6c0807d Compare December 27, 2024 10:04
@ibesora ibesora requested a review from HarelM December 27, 2024 12:42
@HarelM HarelM merged commit bbb4815 into maplibre:main Dec 27, 2024
17 checks passed
@kamil-sienkiewicz-asi
Copy link
Contributor

Hey @ibesora thanks for the fix, however it seems like similar issue is still reproducible

https://codepen.io/kamil-sienkiewicz-asi/pen/zxOZeaP

Kapture.2025-01-07.at.11.39.01.webm

Take a look at top right part of the visible globe, when im moving camera closer and closer to the north pole, one of the tiles decides to reload(?) which results in blinking

cc @HarelM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vector tiles disappear when more detailed tile is being fetched
3 participants