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 file browser toolbar via the settings #12196

Closed
jtpio opened this issue Mar 11, 2022 · 5 comments · Fixed by #12281
Closed

Customize the file browser toolbar via the settings #12196

jtpio opened this issue Mar 11, 2022 · 5 comments · Fixed by #12281

Comments

@jtpio
Copy link
Member

jtpio commented Mar 11, 2022

Problem

Just like the notebook toolbar or file editor toolbar, it would be great if the file browser toolbar could also be configured via the settings.

image

Proposed Solution

Maybe we can follow a similar approach as the other factories, and place the toolbar items in the settings definition.

Additional context

This could also prove useful for customizing the notebook v7 toolbar (see https://github.com/jupyterlab/retrolab/issues/260#issuecomment-971202618 for more context):

image

@jtpio jtpio added enhancement status:Needs Triage Applied to new issues that need triage labels Mar 11, 2022
@jtpio jtpio added this to the 4.0 milestone Mar 11, 2022
@jtpio
Copy link
Member Author

jtpio commented Mar 11, 2022

Adding to 4.0 for consideration.

@jtpio
Copy link
Member Author

jtpio commented Mar 21, 2022

This might depend on #11754 being fixed first for use in Notebook v7.

@jtpio
Copy link
Member Author

jtpio commented Mar 25, 2022

Looks like the current toolbar customization applies to the document factories.

Not sure it will be possible to adapt the current pieces such as createToolbarFactory so they work on generic widgets with a toolbar.

cc @fcollonval who might have some input on this.

@jtpio
Copy link
Member Author

jtpio commented Mar 25, 2022

Ideally in the case Notebook v7 it would be possible to register a new factory like it is already done here for the interface switcher in the notebook toolbar:

https://github.com/jupyter/notebook/blob/30310847d6804294cbeb274eeb91d126c86669f0/packages/lab-extension/src/index.ts#L140-L152

And define overrides in a custom downstream settings file, for example to be able to make the toolbar look a bit more like classic if needed (disabling some items, inserting spacers to pull content to the right):

image

@jtpio
Copy link
Member Author

jtpio commented Mar 25, 2022

One thing that could be tricky is the fact there can be multiple file browsers. It's not clear whether it will be possible to have something generic enough without making it too complicated.

@fcollonval fcollonval self-assigned this Mar 28, 2022
fcollonval added a commit to fcollonval/jupyterlab that referenced this issue Mar 28, 2022
fcollonval added a commit to fcollonval/jupyterlab that referenced this issue Mar 28, 2022
jtpio added a commit that referenced this issue Mar 31, 2022
* Customize the file browser toolbar via the settings
Fixes #12196

* Fix icon in menu for launcher

* Fix tests

* Address review suggestions

* Apply suggestions from code review

Co-authored-by: Jeremy Tuloup <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: Jeremy Tuloup <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants