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

Changes needed for improved single document mode #101

Merged
merged 2 commits into from
Jul 29, 2020

Conversation

ellisonbg
Copy link
Contributor

The PR contains the changes needed for about to the PR'd work on JupyterLab to improve the single document mode. Here is a summary of the changes to jupyter_server:

  • There is now a single master URL regeps that is matched for all frontend view: '/(?P<mode>lab|doc)(?P<workspace>/workspaces/[a-zA-Z0-9\-\_]+)?(?P<tree>/tree/.*)?'
  • The state of single versus multiple document mode is now encoded in the URL, rather than the state restoration system.
  • The workspaces_url and tree_url config and page config no longer make sense and have been removed.
  • There are new workspace, mode, and treePath page config values that are populated by matching the regular expression. Thus, different frontend extensions no longer need to manage their own complex regexp matching to find this information.

@ellisonbg
Copy link
Contributor Author

@afshin

@ellisonbg ellisonbg closed this Jul 25, 2020
@ellisonbg ellisonbg reopened this Jul 25, 2020
@@ -24,6 +24,8 @@
# -----------------------------------------------------------------------------


MASTER_URL_PATTERN = '/(?P<mode>lab|doc)(?P<workspace>/workspaces/[a-zA-Z0-9\-\_]+)?(?P<tree>/tree/.*)?'
Copy link
Contributor

Choose a reason for hiding this comment

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

We had intentionally made lab in the url configurable in case folks have a different name for their application.

Copy link
Member

Choose a reason for hiding this comment

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

I think we should be okay with deployers/admins owning the server, port, and base_url, and deciding that all the paths that get routed by the application server after base_url belong to us, but I did wonder if we should make this be a major version bump because even if the programmatic API is backward-compatible, URL decisions are also API from my point of view.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

With this change the /lab portion formally becomes part of our API, and this is backwards incompatible. We definitely need a major release for this. Agree with what @afshin is saying here that the server, port and base_url are the configurable portion.

Copy link
Member

@afshin afshin left a comment

Choose a reason for hiding this comment

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

👍

@blink1073
Copy link
Contributor

Onward!

@blink1073 blink1073 merged commit 8ee6a45 into jupyterlab:master Jul 29, 2020
@blink1073
Copy link
Contributor

I'll cut a 2.x alpha for this

@blink1073
Copy link
Contributor

https://pypi.org/project/jupyterlab-server/2.0.0a0/

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

Successfully merging this pull request may close these issues.

3 participants