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 issues with setting sky to undefined #4587

Merged
merged 6 commits into from
Aug 22, 2024
Merged

Fix issues with setting sky to undefined #4587

merged 6 commits into from
Aug 22, 2024

Conversation

HarelM
Copy link
Collaborator

@HarelM HarelM commented Aug 22, 2024

Launch Checklist

This is a fix to issues related to sky definition.

Fixes #4517

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

Sorry, something went wrong.

HarelM added 3 commits August 22, 2024 11:12

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@HarelM HarelM requested review from sbachinin and neodescis August 22, 2024 08:37
@HarelM HarelM enabled auto-merge (squash) August 22, 2024 08:37
@codecov-commenter
Copy link

codecov-commenter commented Aug 22, 2024

Codecov Report

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

Project coverage is 87.63%. Comparing base (42d6847) to head (acfee84).
Report is 14 commits behind head on main.

✅ All tests successful. No failed tests found.

Files Patch % Lines
src/style/style.ts 91.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4587      +/-   ##
==========================================
- Coverage   87.74%   87.63%   -0.12%     
==========================================
  Files         247      247              
  Lines       33494    33504      +10     
  Branches     2414     2289     -125     
==========================================
- Hits        29390    29361      -29     
- Misses       3118     3164      +46     
+ Partials      986      979       -7     

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

@HarelM
Copy link
Collaborator Author

HarelM commented Aug 22, 2024

I'm not sure what is the correct way to use animation for removing the sky and fog, but if someone would like to invest time in solving this they are welcome to do so...

@HarelM
Copy link
Collaborator Author

HarelM commented Aug 22, 2024

I've solved the animation issue in last commit.

Copy link
Collaborator

@sbachinin sbachinin left a comment

Choose a reason for hiding this comment

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

Code looks ok except this one comment.
As for the overall design, it's difficult for me to judge

break;
if (!skyOptions && !sky) return;

if (skyOptions && !sky) {
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 a little shorter and more readable would be

if (skyOptions && sky) {
    for...
} else {
    update = true
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

But it's not enough - you need to check all 4 options...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In any case, I think it's OK, if you feel strongly about it let me know...

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's not a big deal )

@HarelM HarelM merged commit 76a01c1 into main Aug 22, 2024
15 checks passed
@HarelM HarelM deleted the fix-sky-undefined branch August 22, 2024 10:08
@HarelM
Copy link
Collaborator Author

HarelM commented Aug 22, 2024

Oops... enabled auto-merge... sorry...

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.

Can't disable all sky rendering when terrain is enabled
3 participants