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

Optimize editor refresh on notebook show #5700

Merged
merged 1 commit into from Dec 10, 2018

Conversation

vidartf
Copy link
Member

@vidartf vidartf commented Nov 29, 2018

  • Adds an option to the editor to prevent automatic refresh on show.
  • Adds logic to notebook widget to selectivly refresh cell editors on show.

Fixes #2639. Fixes #4292 (duplicate of 2639?). At least it helps improve the experience.

@sccolbert: Any gotchas for the phoshpor messaging I'm missing? I'm assuming the following:

  • When in a layout with fixed sizes, the width style attribute is set.
  • The before-show message triggers an update (queued).
  • The update triggers a resize message (if the size has changed since it was hidden).

- Adds an option to the editor to prevent automatic refresh on show.
- Adds logic to notebook widget to selectivly refresh cell editors on show.
@vidartf
Copy link
Member Author

vidartf commented Nov 29, 2018

This also ensures that editors get refreshed when the editor settings are changed.

@ellisonbg ellisonbg self-assigned this Nov 29, 2018
@jasongrout jasongrout added this to the 1.0 milestone Dec 1, 2018
Copy link
Contributor

@ellisonbg ellisonbg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In local tests this looks good. I think we should merge it ASAP so people can test before a release.

@blink1073
Copy link
Member

Merging, thanks!

@blink1073 blink1073 merged commit ad2d922 into jupyterlab:master Dec 10, 2018
@vidartf vidartf deleted the optimize-edit branch December 10, 2018 22:21
jasongrout added a commit to jasongrout/jupyterlab that referenced this pull request Feb 21, 2019
In ad2d922 (jupyterlab#5700), editor refreshing is eliminated in AfterShow messages for cells. This means when opening a notebook with a rendered Markdown, double-clicking to edit the Markdown cell now no longer refreshes the editor, which means the editor initially is the wrong height (often zero height). This changes forces an editor refresh explicitly in this case.
@lock lock bot added the status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Aug 8, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Aug 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug pkg:codemirror status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switching to a big notebook in a tab is slow performance: slow toggling to a large notebook
4 participants