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

[BUG] - Spacing of menu items in JupyterHub 5 #20

Closed
krassowski opened this issue May 24, 2024 · 1 comment · Fixed by #21
Closed

[BUG] - Spacing of menu items in JupyterHub 5 #20

krassowski opened this issue May 24, 2024 · 1 comment · Fixed by #21
Labels
needs: triage 🚦 Someone needs to have a look at this issue and triage type: bug 🐛 Something isn't working

Comments

@krassowski
Copy link
Member

krassowski commented May 24, 2024

Describe the bug

In JupyterHub 5.0b2 the navigation bar menu items have too little spacing:

image

Expected behavior

Items have spacing

How to Reproduce the problem?

Run latest nebari pre-release with jhub-apps disabled

Command output

No response

Versions and dependencies used.

No response

Anything else?

Upstream change happened in jupyterhub/jupyterhub@2fe0608, briefly:

        {% if user %}
-        <ul class="nav navbar-nav">
+        <ul class="nav navbar-nav me-auto mb-2 mb-lg-0">
          {% block nav_bar_left_items %}
-            <li><a href="{{base_url}}home">Home</a></li>
+            <li class="nav-item"><a class="nav-link" href="{{base_url}}home">Home</a></li>
-            <li><a href="{{base_url}}token">Token</a></li>
+            <li class="nav-item"><a class="nav-link" href="{{base_url}}token">Token</a></li>
            {% if 'admin-ui' in parsed_scopes %}
-            <li><a href="{{base_url}}admin">Admin</a></li>
+            <li class="nav-item"><a class="nav-link" href="{{base_url}}admin">Admin</a></li>
            {% endif %}
            {% if services %}
-            <li class="dropdown">
+            <li class="nav-item dropdown">

Originally noticed in nebari-dev/nebari#2468 (comment)

@krassowski krassowski added needs: triage 🚦 Someone needs to have a look at this issue and triage type: bug 🐛 Something isn't working labels May 24, 2024
@krassowski
Copy link
Member Author

Why is it an issue in this nebari-jupyterhub-theme rather than upstream? Because it overrides nav_bar_left_items block, but using the old Bootstrap 4 approach (i.e. it was not yet upgraded to Bootstrap 5):

{% block nav_bar_left_items %}
<!-- Default nav bar items -->
<li><a href="{{base_url}}home {% if cdsdashboards_restricted %}-cds{% endif %}">Home</a></li>
<li><a href="{{base_url}}token">Token</a></li>
<!-- Access to admin dashboard -->
{% if user.admin %}
<li><a href="{{base_url}}admin">Admin</a></li>
{% endif %}
{% if services %}
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Services<span class="caret"></span></a>
<ul class="dropdown-menu">
{% for service in services %}
<li><a class="dropdown-item" href="{{service.prefix}}">{{service.name}}</a></li>
{% endfor %}
</ul>
</li>
{% endif %}
<!-- Custom integrations-->
<li><a href="/auth/admin/nebari/console/">User Management</a></li>
<li><a href="/argo">Argo Workflows</a></li>
{% if cdsdashboards_enabled %}
<li><a href="{{ base_url }}dashboards">Dashboards</a></li>
{% endif %}
<li><a href="/conda-store">Environment Management</a></li>
<li><a href="/monitoring">Monitoring</a></li>
{% endblock nav_bar_left_items %}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: triage 🚦 Someone needs to have a look at this issue and triage type: bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant