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

CodeChunk: Use presence of session provider url for showing/hiding Run button #227

Open
alex-ketch opened this issue Sep 9, 2021 · 0 comments
Assignees

Comments

@alex-ketch
Copy link
Contributor

Currently we check for presence of executeHandler function prop on the CodeChunk component to determine whether the code can be executed or not.

The executeHandler is usually attached on page load, currently by the <stencila-executable-toolbar> or the Web Client in the future.

Doing so after page load can lead to a needless re-render and incurs a performance penalty.
Instead we should explore using alternate indicators in the componentWillLoad lifecycle, and avoid a repaint.
We could use the presence of session provider url, or the stencilaWebClient being present in the global scope.

@alex-ketch alex-ketch self-assigned this Sep 9, 2021
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

No branches or pull requests

1 participant