-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Interactives UX: Finalize insert code #5499
Conversation
e17b888
to
ce115d3
Compare
0de8146
to
149fd58
Compare
return | ||
} | ||
|
||
window.requestAnimationFrame(() => this.codemirror.setSize('100%', '100%')) |
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 seems like a way to defer the setSize
method call. I'm interested in what the pros are of this approach.
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.
Yup, this queues the changes until right before the browsers next render. It's a performance optimization (often used in animations) so allow visual updates to only run on browser repaints. This is usually synced with the browser frame rate.
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 looks great in general. Left a question. Some of the sass constants could be stored as variables in the ozaria varables.sass.
I also tried to test this using proxy mode with the following interactive: http://localhost:3000/interactive/5d0beffa9339c40022a56557?code-language=python
I get the error:
TypeError: "this.selectedAnswer is undefined"
artUrl index.vue:155
and the page doesn't load. Is this expected and handled in another PR?
@AndrewJakubowicz good catch, this was not handled in another PR. Fixed. |
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.
Confirm bug is resolved.
LGTM!
Finalize insert code UX