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

Customize the shell layout with the settings #6921

Merged
merged 17 commits into from
Jun 15, 2023
Merged

Conversation

jtpio
Copy link
Member

@jtpio jtpio commented Jun 14, 2023

Fixes #6688
Fixes #6386
Fixes #6915

  • Add schema to define a user layout
  • Add type to the shell.add() calls if any
  • Add defaults?
  • Add documentation, using the Voila Preview and the Markdown Preview as examples
  • Add UI test
  • Add the api-change GitHub label because the Shell namespace was renamed to INotebookShell

For now the page needs to be refreshed for the user layout to be effective.

layout-settings.mp4

@github-actions
Copy link
Contributor

Binder 👈 Launch a Binder on branch jtpio/notebook/layout-settings

@jtpio jtpio added this to the 7.0 milestone Jun 14, 2023
Copy link
Contributor

@andrii-i andrii-i left a comment

Choose a reason for hiding this comment

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

Core customization functionality looks and works well.

@jtpio
Copy link
Member Author

jtpio commented Jun 14, 2023

Configuring the Voila preview with the following settings to open in the right area:

{
    "layout": {
      "Voila-preview": {"area": "right"}
    }
}
voila-preview.mp4

@jtpio
Copy link
Member Author

jtpio commented Jun 14, 2023

This will also be useful to get the markdown preview, that we can add to the settings by default:

layout-settings-markdown.mp4

@jtpio
Copy link
Member Author

jtpio commented Jun 14, 2023

bot please update playwright snapshots

@jtpio jtpio closed this Jun 14, 2023
@jtpio jtpio reopened this Jun 14, 2023
@jtpio
Copy link
Member Author

jtpio commented Jun 14, 2023

As discussed today at Notebook meeting, I opened an issue in JupyterLab to consider making the shell layout customization more generic between JupyterLab and Notebook 7: jupyterlab/jupyterlab#14685

It's not clear whether this can be addressed before the Notebook 7 final release, or if this should be considered for a future version.

So marking this as ready, although happy to make further improvements to the docs in follow-up PRs.

@jtpio jtpio marked this pull request as ready for review June 14, 2023 20:14
Copy link
Contributor

@andrii-i andrii-i left a comment

Choose a reason for hiding this comment

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

Customization works well. Tests and documentation look good as well. Thank you @jtpio.

@jtpio
Copy link
Member Author

jtpio commented Jun 15, 2023

Thanks @andrii-i for the review!

@jtpio jtpio merged commit ab57fa1 into jupyter:main Jun 15, 2023
@jtpio jtpio deleted the layout-settings branch June 15, 2023 07:47
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants