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 sources and markers while fog transitioning #10691

Merged
merged 3 commits into from
May 21, 2021

Conversation

rreusser
Copy link
Contributor

@rreusser rreusser commented May 20, 2021

Addresses #10686

Since fog affects tile culling and marker appearance, this PR checks whether fog is transitioning and updates sources and markers during the transition.

Before this fix (tiles do not load and marker reflects state at the start of the transition rather than during or after it):

pre-fix

After this fix (marker and sources update during transition):

post-fix

Note: _updateFog() alone was not adequate to solve the problem since even if it computes an updated tile culling threshold, it does not apply it.

Launch Checklist

  • briefly describe the changes in this PR
  • 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
  • manually test the debug page
  • tagged @mapbox/map-design-team @mapbox/static-apis if this PR includes style spec API or visual changes
  • tagged @mapbox/gl-native if this PR includes shader changes or needs a native port
  • apply changelog label ('bug', 'feature', 'docs', etc) or use the label 'skip changelog'
  • add an entry inside this element for inclusion in the mapbox-gl-js changelog: <changelog></changelog>

Sorry, something went wrong.

@rreusser rreusser added bug 🐞 skip changelog Used for PRs that do not need a changelog entry 3d 📐 labels May 20, 2021
Copy link
Contributor

@karimnaaji karimnaaji left a comment

Choose a reason for hiding this comment

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

The change looks good to me, nice find! Just some minor suggestion.

These type of fixes should directly target the main branch so we're sure to not forget about them. Could you cherry-pick this change + #10679 to merge back in main?

Is there any reasonable way we could unit test that? e.g. confirm that a transition results in a fog update.

Copy link
Contributor

@karimnaaji karimnaaji left a comment

Choose a reason for hiding this comment

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

Approving for release branch, and remainder (unit tests) to be addressed when targeting the main branch.

@rreusser rreusser merged commit c8c159f into release-v2.3.0 May 21, 2021
@rreusser rreusser deleted the ricky/fog-transition-fix branch May 21, 2021 18:19
rreusser added a commit that referenced this pull request May 21, 2021
* Update sources while fog transitioning

* Apply fix to markers

* Remove unnecessary comment
rreusser added a commit that referenced this pull request May 28, 2021
* Update sources while fog transitioning

* Apply fix to markers

* Remove unnecessary comment
karimnaaji pushed a commit that referenced this pull request Jun 1, 2021
* Implement dual ESM + CJS compatibility in style-spec (#10718)

* Implement dual ESM + CJS compatibility in style-spec

* Try to catch additional references to non-cjs files

* Remove accidentally-committed files

* Revert main entry point

* Revert module field as well

* Update sources and markers while fog transitioning (#10691)

* Update sources while fog transitioning

* Apply fix to markers

* Remove unnecessary comment

* Include dist/package.json in npm published files (#10668)

* Disable fog tile culling with low horizon-blend (#10679)

* Cherry-pick changelogs
SnailBones pushed a commit to SnailBones/mapbox-gl-js that referenced this pull request Jul 15, 2021
* Implement dual ESM + CJS compatibility in style-spec (mapbox#10718)

* Implement dual ESM + CJS compatibility in style-spec

* Try to catch additional references to non-cjs files

* Remove accidentally-committed files

* Revert main entry point

* Revert module field as well

* Update sources and markers while fog transitioning (mapbox#10691)

* Update sources while fog transitioning

* Apply fix to markers

* Remove unnecessary comment

* Include dist/package.json in npm published files (mapbox#10668)

* Disable fog tile culling with low horizon-blend (mapbox#10679)

* Cherry-pick changelogs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3d 📐 bug 🐞 skip changelog Used for PRs that do not need a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants