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

Fix file browser model autostart, simplify poll start logic. #6401

Merged
merged 10 commits into from May 24, 2019

Conversation

@afshin
Copy link
Member

@afshin afshin commented May 24, 2019

References

PR #6394

PR #6399

Code changes

Removes the when field from poll instantiation options and the consequent when logic in favor of an auto boolean field that defaults to true and starts most polls automatically. If necessary, auto can be set to false to allow a client to manually Poll#start(). This should simplify both the Poll class and its usage.

User-facing changes

File browser works again when the page loads.

Backwards-incompatible changes

Poll instantiation IOptions no longer accepts when.

@afshin afshin added this to the 1.0 milestone May 24, 2019
@afshin afshin self-assigned this May 24, 2019
@jupyterlab-dev-mode
Copy link

@jupyterlab-dev-mode jupyterlab-dev-mode bot commented May 24, 2019

Thanks for making a pull request to JupyterLab!

To try out this branch on binder, follow this link: Binder

@afshin afshin changed the title Fix file browser model autostart, simplify poll start logic. [WIP] Fix file browser model autostart, simplify poll start logic. May 24, 2019
@afshin afshin changed the title [WIP] Fix file browser model autostart, simplify poll start logic. Fix file browser model autostart, simplify poll start logic. May 24, 2019
Copy link
Member

@blink1073 blink1073 left a comment

One grammar nit, otherwise LGTM!

buildutils/README.md Outdated Show resolved Hide resolved
@blink1073
Copy link
Member

@blink1073 blink1073 commented May 24, 2019

Docs failure:

lerna ERR! yarn run docs exited 4 in '@jupyterlab/coreutils'
lerna ERR! yarn run docs stdout:
$ typedoc --options tdoptions.json --theme ../../typedoc-theme src src/plugin-schema.json

Using TypeScript 3.2.4 from /home/vsts/work/1/s/node_modules/typedoc/node_modules/typescript/lib
Error: /home/vsts/work/1/s/packages/coreutils/src/poll.ts(368)
 Cannot invoke an expression whose type lacks a call signature. Type '((handle: number) => void) | ((immediateId: Immediate) => void)' has no compatible call signatures.

typeof cancelAnimationFrame === 'function'
? cancelAnimationFrame
: clearImmediate;

Copy link
Member Author

@afshin afshin May 24, 2019

Choose a reason for hiding this comment

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

This is cribbed from PhosphorJS

It allows polling to work in the browser and in NodeJS.

@blink1073 blink1073 merged commit 7fb34cd into jupyterlab:master May 24, 2019
9 checks passed
@lock
Copy link

@lock lock bot commented Aug 6, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related discussion.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants