-
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
Trigger a rendering when a data source becomes ready #11934
Conversation
Thank you for the pull request, @javagl! ✅ We can confirm we have a CLA on file for you. |
Thanks @javagl! I do think this is an appropriate fix for the specific issue. Could you please update This may be a bit tricky to test the specific of this fix given that completed requests will also trigger renders. One option would be to start listening once the datasource request is complete. |
I updated the CHANGES.md, and added a test, roughly following the pattern from similar specs. Should I try to cover some flow like
? |
Thanks @javagl! Any additional coverage would be appreciated. Your point about the |
Well, upon further investigation, it was reset to |
@ggetz I don't see a connection between the changes in this PR and the current build failures. But if there could be a connection, I can have another look... |
@javagl I agree the CI failure is unrelated. I'll open a new issue to track. |
Thanks @javagl! This is looking good to me. |
Description
This only triggers a
requestRender()
when aDataSource
becomes 'ready' for the first time, inDataSourceDisplay#update
.This fixes #11928
(Which was a regression from #11855 )
Testing plan
Until now, I tested this with the Sandcastle from the original issue. The behavior now is that when the data source finishes loading (as indicated by the 'Loaded' console message), a
requestRender
is triggered and the geometry appears without moving the camera.I also tested it with the "Case 1, Primitive" sandcastle from the PR #11855, just to check that this behaves as before.
For unit tests: I'll have to check how this can be tested sensibly. There probably already is a test along the lines of
But I first wanted to confirm that this is the right "layer" of addressing this issue. (It could probably be solved in a million different ways, and it's not unlikely that there is a "better" way to solve it...)
Author checklist
CONTRIBUTORS.md
CHANGES.md
with a short summary of my change