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

Add support for rank to the top area #7278

Merged
merged 4 commits into from Oct 1, 2019
Merged

Conversation

jtpio
Copy link
Member

@jtpio jtpio commented Sep 29, 2019

References

Partially related to #6096.

#6096 is more general and also considers the main area.

This change is only for the top area.

Code changes

Add a PanelHandler wrapper to store the widget ranks for the top area.
It should be possible to use the same wrapper for the header and bottom areas too, and potentially merge it with the existing SideBarHandler (also sorting its widgets).

Ideally all areas should support ranks by default. However as pointed out by @Madhu94 in #6096 this might become tricky for the main area (is there a notion of rank / order for this area?)

Developer-facing changes

Third-party extensions (example) can now use the rank parameter when adding widgets to the top area:

// place a custom widget in front of the Jupyter logo
app.shell(widget, 'top', { rank: -1 });

User-facing changes

None

Backwards-incompatible changes

None

@jupyterlab-dev-mode
Copy link

Thanks for making a pull request to JupyterLab!

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

Copy link
Member

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@blink1073 blink1073 added this to the 1.2 milestone Oct 1, 2019
@blink1073 blink1073 merged commit 1e8d871 into jupyterlab:master Oct 1, 2019
@jtpio jtpio deleted the rank-top branch October 1, 2019 04:58
@jasongrout jasongrout modified the milestones: 1.2, 2.0 Oct 11, 2019
@lock lock bot added the status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Nov 10, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Nov 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement pkg:application status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. tag:Extensions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants