Skip to content

Conversation

@HarelM
Copy link
Collaborator

@HarelM HarelM commented Nov 23, 2025

This introduces the InViewTiles class that stores all the tiles that are currently loaded in view.
It moves some of the logic related to these tiles to this class.
It moves the raster fade logic into another file (not a class, but just a method at this point).
It moves some methods and for loops around to better places than what they used to be.
This PR doesn't change any internal logic as far as I could see.

This is related to other PRs in this area, in order to improve the code in Tile Manager.
I couldn't find a lot of code related to vector handling that is worth a tile_manager_vector.ts file, but I might have overlooked.

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.
  • Add an entry to CHANGELOG.md under the ## main section.

@codecov
Copy link

codecov bot commented Nov 23, 2025

Codecov Report

❌ Patch coverage is 95.55556% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.40%. Comparing base (be04c90) to head (d54583b).
⚠️ Report is 18 commits behind head on main.

Files with missing lines Patch % Lines
src/tile/tile_manager_raster_dem.ts 80.76% 5 Missing ⚠️
src/tile/tile_manager_raster.ts 94.80% 4 Missing ⚠️
src/tile/tile_manager.ts 98.46% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6756      +/-   ##
==========================================
+ Coverage   92.23%   92.40%   +0.17%     
==========================================
  Files         285      288       +3     
  Lines       23735    23771      +36     
  Branches     5043     5054      +11     
==========================================
+ Hits        21891    21965      +74     
+ Misses       1844     1806      -38     

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Collaborator

@wayofthefuture wayofthefuture left a comment

Choose a reason for hiding this comment

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

I gave it a good read, but can't really get into testing it as I'm out of town. Will have more time starting Wednesday. Looks good to me though... I added some slight suggestions...

@HarelM HarelM marked this pull request as ready for review November 23, 2025 19:09
@maplibre maplibre deleted a comment from HarelM Nov 27, 2025
@wayofthefuture
Copy link
Collaborator

I accidentally deleted your comment about tests fyi!

@HarelM
Copy link
Collaborator Author

HarelM commented Nov 28, 2025

Ok, I've added tests to sorting, added some checks to backfill flag to avoid doing it twice when there's no need, and added tests for that.

@HarelM HarelM enabled auto-merge (squash) November 28, 2025 07:48
@HarelM HarelM merged commit a2add46 into main Nov 28, 2025
42 of 44 checks passed
@HarelM HarelM deleted the split-tile-manager-logic branch November 28, 2025 08:39
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.

3 participants