-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
remove defaultValue() and create DefaultValue namespace #12252
base: main
Are you sure you want to change the base?
Conversation
- I started over because I could not get the tests to pass - removed defaultValue() in 'easy' to spot references - fetched most up to date copy of cesium, so that my pull request wasn't cluttered
Thank you for the pull request, @dave-b-b! ✅ We can confirm we have a CLA on file for you. |
@jjspace Can you delete the other commits I had? I started over because I couldn't get the tests to pass. This one is much cleaner. If I can get help on the two tests that are failing, then I can move forward with this one. |
@dave-b-b I'm a little confused on the state of this with #12207 still open? should that PR be closed and only plan to merge this one? |
@jjspace Yes, I could not get the tests to pass on #12207, so I started over. You can delete that pull request because I redid everything here. They weren't passing on my machine. I'm almost done with this pull request. I'm trying to finish everything right now. |
@jjspace I finished and submitted the final pull request, but I'm not sure whether I should rebase/merge. A few of the tests are failing, so I must have messed something up. Can you help with this?
|
- change CesiumMath.toRadians((tilt, 0.0)) to CesiumMath.toRadians(tilt ?? 0.0) - put the parenthesis in the right place to fix the logic in FramebuggerManager lines 143 - 151
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did a pass on just the code and spotted a handful of text errors. looks like you might've fixed one already but take a look. I will try and look at the test failures soon if they're still happening.
text += `<tr><th>${ | ||
value.displayName ?? key | ||
}</th><td>${(value.value, "")}</td></tr>`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
text += `<tr><th>${ | |
value.displayName ?? key | |
}</th><td>${(value.value, "")}</td></tr>`; | |
text += `<tr><th>${ | |
value.displayName ?? key | |
}</th><td>${value.value ?? ""}</td></tr>`; |
|
||
tilt = CesiumMath.toRadians(defaultValue(tilt, 0.0)); | ||
heading = CesiumMath.toRadians(defaultValue(heading, 0.0)); | ||
tilt = CesiumMath.toRadians((tilt, 0.0)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tilt = CesiumMath.toRadians((tilt, 0.0)); | |
tilt = CesiumMath.toRadians(tilt ?? 0.0); |
It seems like only the following errors remain - renders a point - renders pnts with point size style
@jjspace Everything seems fine except two tests that I can't get to pass.
|
@jjspace Not sure why this test fails in the pipeline, but it passes when I run it on my computer.... |
- I started over because I could not get the tests to pass - removed defaultValue() in 'easy' to spot references - fetched most up to date copy of cesium, so that my pull request wasn't cluttered
- change CesiumMath.toRadians((tilt, 0.0)) to CesiumMath.toRadians(tilt ?? 0.0) - put the parenthesis in the right place to fix the logic in FramebuggerManager lines 143 - 151
It seems like only the following errors remain - renders a point - renders pnts with point size style
- updated CHANGES.md - updated CONTRIBUTORS.md - removed defaultValue() rom FramebufferManager.js - commented out tests for defaultValueSpec.js
@jjspace I think this is done now. I add something to the change log under 2024-12-01 |
@jjspace Should I update the branch? I don't know what I should do. We already discussed the one test that is failing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dave-b-b this is looking good. All the tests are passing now and I didn't spot any other weird instances of missing parens or formatting issues. Just had a couple small comments.
It looks like there might have been a bad merge somewhere. It's considering all the #11953 changes and one or two other PR's changes as being part of this PR. Could you take a look at the git history and see what might've happened.
On top of that since this is such a wide reaching change we'll probably want to tag a commit before and after this change to make it easier to merge into other PRs. Similar to what we did for the recent prettier changes. I can help create the tags but we should figure out the other git issue first
expect(defaultValue(1, 5)).toEqual(1); | ||
}); | ||
}); | ||
// import { defaultValue } from "../../index.js"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can probably be deleted completely right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah This can be deleted.
##### Deprecated :hourglass_flowing_sand: | ||
|
||
- defaultValue() has been deprecated. All uses have been changed to the nullish coalescing operator (??) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can go under the 1.123 release since that will be the next one (and I expect we should be able to get this in by then)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jjspace Is the play to stick with the nullish coalescing operator, or deprecating defaultValue and create DefaultValue? Based on #12238, I understood it is the latter. If that is the case, would it make more sense to first create DefaultValue and then replace defaultValue with DefaultValue in the codebase? I saw Dave mention he may need to redo the majority of the PR, so it may be easier to directly replace defaultValue with DefaultValue. Rather than replace defaultValue with ?? to then replace it with DefaultValue. If I misunderstood anything, could you provide some guidance?
@jjspace I didn't realize that rebasing would bring in changes from other pull requests. The only way for me to undo this would be to redo the vast majority of the pull request. Can you help me figure this out? |
Description
Issue number and link
Issue: 11674
#11674
Testing plan
The following tests failed:
✗ renders a point
✗ renders pnts with point size style
Author checklist
CONTRIBUTORS.md
CHANGES.md
with a short summary of my change