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

feat: core-styles v2 header #1068

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
},
"devDependencies": {
"@rollup/plugin-eslint": "^8.0.1",
"@tacc/core-styles": "^2.11.0",
"@tacc/core-styles": "^2.39.4",
"@testing-library/jest-dom": "^5.0.2",
"@testing-library/react": "^16.0.1",
"@types/js-cookie": "^3.0.6",
Expand Down
4 changes: 0 additions & 4 deletions client/src/styles/components/bootstrap.utils.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
/* Shims for deprecated Bootstrap4 utils */

.ml-auto {
margin-left: auto !important;
}

Comment on lines -3 to -6
Copy link
Member Author

Choose a reason for hiding this comment

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

What? This was backwards-compatibility we added that Bootstrap chose not to add. We will instead use their new class names, me-auto and ms-auto. Search diff for me-auto.1

Footnotes

  1. which translate to margin(-inline-)end: auto and margin(-inline-)start: auto

.sr-only {
position: absolute;
width: 1px;
Expand Down
2 changes: 1 addition & 1 deletion client/src/styles/settings/color.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import url('@tacc/core-styles/src/lib/_imports/settings/color.css');
@import url('@tacc/core-styles/dist/settings/color.css');

/* If Design doc uses color on the left, use color on the right
(When design is updated to use the new colors, we can remove this)
Expand Down
3 changes: 0 additions & 3 deletions client/src/styles/trumps/icon.fonts.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion server/conf/docker/docker-compose-dev.all.debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
version: "3.8"
services:
cms:
image: taccwma/core-cms:ff737a3
image: taccwma/core-cms:v4.25.1
volumes:
- ../cms/secrets.py:/code/taccsite_cms/secrets.py
- ../cms/uwsgi/uwsgi.ini:/code/uwsgi.ini
Expand Down
6 changes: 3 additions & 3 deletions server/portal/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
<link rel="canonical" href="{{request.get_full_path}}">
<base href="/">
{% block head_extra %}{% endblock %}
<!-- Core CSS -->
<link id="css-site-font" rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" />
<link id="css-site-header" rel="stylesheet" href="/static/site_cms/css/build/site.header.css" />
Comment on lines -19 to -21
Copy link
Member Author

Choose a reason for hiding this comment

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

Why? These are old solutions.

{% if settings.PORTAL_CSS_FILENAMES|length %}
<!-- Project CSS -->
{% for stylesheet in settings.PORTAL_CSS_FILENAMES %}
Expand All @@ -27,6 +24,9 @@
{% endif %}
<!-- Vendor CSS -->
<link id="css-bootstrap" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<!-- Header CSS -->
<link rel="stylesheet" href="/static/site_cms/css/build/core-styles.theme.default.css">
<link rel="stylesheet" href="/static/site_cms/css/build/core-styles.header.css">

{% block styles %}{% endblock %}
</head>
Expand Down
4 changes: 2 additions & 2 deletions server/portal/templates/includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@



{% include "includes/nav_cms.html" with className="navbar-nav" only %}
{% include "includes/nav_cms.html" with className="navbar-nav me-auto" only %}
Copy link
Member Author

Choose a reason for hiding this comment

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

To match Core-CMS (which uses Bootstrap 4 mr-auto).


{% include "includes/nav_search.html" with className="form-inline ml-auto" only %}
{% include "includes/nav_search.html" with className="form-inline" only %}
Copy link
Member Author

Choose a reason for hiding this comment

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

To match Core-CMS (which stopped using a margin class here).

{# FAQ: Unlike CMS and User Guide, we must pass `user` #}
{% include "includes/nav_portal.html" with className="navbar-nav" user=user settings=settings only %}

Expand Down
2 changes: 1 addition & 1 deletion server/portal/templates/includes/nav_portal.raw.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<span>{{ user.get_username }}</span>
<span class="sr-only">Toggle Dropdown</span>
</a>
<nav class="dropdown-menu dropdown-menu-right">
<nav class="dropdown-menu dropdown-menu-end">
<a class="dropdown-item" href="{% url 'workbench:dashboard' %}">
<i class="icon icon-dashboard"></i> My Dashboard
</a>
Expand Down
Loading