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 deploy app label to toolbar #8

Merged
merged 3 commits into from
Oct 2, 2024
Merged

Conversation

nenb
Copy link
Collaborator

@nenb nenb commented Oct 2, 2024

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 in index.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 apply

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds a feature)
  • Breaking change (fix or feature that would cause existing features not to work as expected)
  • Documentation Update
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build related changes
  • Other (please describe):

Testing

  • Did you test the pull request locally?
  • Did you add new tests?

Documentation

Access-centered content checklist

Text styling

  • The content is written with plain language (where relevant).
  • If there are headers, they use the proper header tags (with only one level-one header: H1 or # in markdown).
  • All links describe where they link to (for example, check the Nebari website).
  • This content adheres to the Nebari style guides.

Non-text content

  • All content is represented as text (for example, images need alt text, and videos need captions or descriptive transcripts).
  • If there are emojis, there are not more than three in a row.
  • Don't use flashing GIFs or videos.
  • If the content were to be read as plain text, it still makes sense, and no information is missing.

Any other comments?

Copy link
Contributor

github-actions bot commented Oct 2, 2024

Binder 👈 Launch a Binder on branch nebari-dev/jupyterlab-jhub-apps/add-deploy-app-label-toolbar

@nenb nenb added the needs: review 👀 This PR is complete and ready for reviewing label Oct 2, 2024
@nenb
Copy link
Collaborator Author

nenb commented Oct 2, 2024

bot please update snapshots

@nenb nenb marked this pull request as ready for review October 2, 2024 12:51
@nenb nenb requested a review from krassowski October 2, 2024 12:52
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 {
Copy link
Member

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.

Copy link
Collaborator Author

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! 🙏

@nenb nenb added the feature label Oct 2, 2024
Copy link
Member

@krassowski krassowski left a comment

Choose a reason for hiding this comment

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

Thanks @nenb!

@krassowski krassowski removed the needs: review 👀 This PR is complete and ready for reviewing label Oct 2, 2024
@krassowski krassowski merged commit a3d963e into main Oct 2, 2024
7 of 8 checks passed
@krassowski krassowski linked an issue Oct 2, 2024 that may be closed by this pull request
@nenb nenb deleted the add-deploy-app-label-toolbar branch October 2, 2024 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add "Deploy App" label in toolbar?
2 participants