-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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!: rendered
meaning
#7747
fix!: rendered
meaning
#7747
Conversation
3998b14
to
e0f9525
Compare
e0f9525
to
902aeae
Compare
@@ -123,7 +123,6 @@ export class Input { | |||
|
|||
if (this.sourceBlock.rendered) { |
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.
would it be possible to just check instanceof BlockSvg
then you wouldn't need to cast either? circular dependencies are the only reason i can think of you wouldn't do that but i'm hoping that doesn't apply here
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.
It causes circular dependencies.
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.
:(
The basics
The details
Resolves
Fixes #4288
Proposed Changes
Makes it so that
rendered
is constant, and is only used to check whether the block is aBlock
or aBlockSvg
.Reason for Changes
Makes the system easier to reason about and understand.
Test Coverage
Fixed change detectors.
Documentation
This will need docs. I have separate tasks filed for that.
Additional Information
This PR creates a pretty significant performance degredation related to
bumpNeighbours
I have a separate fix in the works for that. But in an effort to keep my PRs small I'm putting that up separately.There's also more work to be removing references to
initSvg
andrendered
and cleaning upinitSvg
.Dependent on #7745
Breaking changes / To fix
If you are using
rendered
to check whether the block is initialized or currently visible, do not do that.rendered
should only be used to tell if the block is aBlock
instance or aBlockSvg
instance.If you are setting
rendered
to temporarily disable rendering and improve performance, that is no longer necessary because we perform rendering batching.If you have another use case for accessing
rendered
that is not covered here, please let us know on the forum.