Skip to content

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

@alex-ketch

Description

@alex-ketch

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions