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 flickering on lines #5094

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

ibesora
Copy link
Collaborator

@ibesora ibesora commented Nov 21, 2024

This PR fixes line flickering as seen in #5025
The problem was that we were calling a function that changed the stencil value used even if we were not using the result of it. Wrapping everything with an if block made it work

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 Nov 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.11%. Comparing base (94e2729) to head (d00152c).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5094      +/-   ##
==========================================
+ Coverage   89.06%   89.11%   +0.05%     
==========================================
  Files         269      269              
  Lines       38386    38392       +6     
  Branches     2370     2382      +12     
==========================================
+ Hits        34189    34214      +25     
+ Misses       3188     3173      -15     
+ Partials     1009     1005       -4     

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


🚨 Try these New Features:

@@ -377,6 +377,9 @@ export class Painter {
* mask area of tile overlapped by children tiles.
* Stencil ref values continue range used in _tileClippingMaskIDs.
*
* Attention: This function changes this.nextStencilID even if the result of it
Copy link
Collaborator

Choose a reason for hiding this comment

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

I have little faith someone will read this comment, and that it will reflect what the method is doing in the future.

I would consider splitting it to getting current and advancing the next or rename it to reflect that it changes the state.

"sources": {
"labels": {
"type": "geojson",
"data": "https://zerda.de/labels_small.geojson"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it will be better to inline the relevant geojson line to prevent this tests from failing in the future if this file is not available.
Also we probably need only one line, so it should be straight forward...
It's also worth making sure the test fails without the fix.

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.

2 participants