-
Notifications
You must be signed in to change notification settings - Fork 1
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 deploy app label to toolbar #8
Conversation
bot please update snapshots |
style/base.css
Outdated
@@ -3,3 +3,13 @@ | |||
|
|||
https://jupyterlab.readthedocs.io/en/stable/developer/css.html | |||
*/ | |||
|
|||
.jp-ToolbarButtonComponent[data-command='jhub-apps:deploy-app'] svg { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use child combinator here? Bare selector on right hand side can impact performance of the entire app. Browser match s lectors right to left traversing entire dom tree (optimizations like bloom filters aside). Adding a more specific rule allows browser to short circuit after looking just at the parent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Mike, I didn't appreciate this, really great advice! 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @nenb!
This PR adds the deploy app label as indicated in the mockups.
I spent some time trying to find a way to dynamically update the label based on whether or not the toolbar was 'narrow'. (I defined narrow as whether or not
popupOpener
was visible on the toolbar.)Unfortunately, there appears to be a bug in how the label is set for extensions to the toolbar - it seems to be required to set the
label
value in the JSON file inside/schema
, and the value inindex.ts
appears to be consistently ignored. See the final comment in https://discourse.jupyter.org/t/jl-4-toolbar-button-with-icon-and-text/20519/2.I couldn't find a way to update non
properties
attributes in the JSON file (see also https://github.com/jupyterlab/extension-examples/tree/main/settings) and so I have not included any dynamic update to the label in this PR.Reference Issues or PRs
#2
What does this implement/fix?
Put a
x
in the boxes that applyTesting
Documentation
Access-centered content checklist
Text styling
H1
or#
in markdown).Non-text content
Any other comments?