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 vidartf requested review from ian-r-rose and blink1073 Nov 29, 2018
@vidartf
Copy link
Member Author

@vidartf 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

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

@blink1073
Copy link
Member

@blink1073 blink1073 commented Dec 10, 2018

Merging, thanks!

@blink1073 blink1073 merged commit ad2d922 into jupyterlab:master Dec 10, 2018
2 of 3 checks passed
@vidartf vidartf deleted the optimize-edit branch Dec 10, 2018
jasongrout added a commit to jasongrout/jupyterlab that referenced this issue 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 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.