From 4d874689cb89701252290ce975bc45656765a7b3 Mon Sep 17 00:00:00 2001 From: functionzz <164675620+functionzz@users.noreply.github.com> Date: Sat, 25 Jul 2026 13:15:09 -0400 Subject: [PATCH] move to env, remove dash, reformat dashboard css --- pontoon/insights/chs.py | 12 +---------- pontoon/insights/static/css/insights.css | 20 +++++++++++++++---- .../widgets/community_health_table.html | 16 +++++++-------- pontoon/settings/base.py | 11 ++++++++++ 4 files changed, 35 insertions(+), 24 deletions(-) diff --git a/pontoon/insights/chs.py b/pontoon/insights/chs.py index 0b19585abe..25129f4b02 100644 --- a/pontoon/insights/chs.py +++ b/pontoon/insights/chs.py @@ -18,6 +18,7 @@ ALL_CONTRIBUTOR_STRING_THRESHOLD, COMPLETION_POINTS, ENABLED_PROJECT_POINTS, + KEY_PROJECT_SLUGS, MANAGER_POINTS, MANAGER_STRING_THRESHOLD, NEW_SIGNUP_POINTS, @@ -27,17 +28,6 @@ ) -KEY_PROJECT_SLUGS = [ - "firefox-for-android", - "firefox-for-ios", - "mozilla-monitor-website", - "firefox-relay-website", - "firefox", - "mozilla-accounts", - "mozilla-vpn-client", -] - - def get_completion_by_locale(locales) -> dict[int, float]: """Locale-level completion %: (approved + warnings) / total * 100.""" diff --git a/pontoon/insights/static/css/insights.css b/pontoon/insights/static/css/insights.css index 3d4ed2acf4..62e48bab64 100644 --- a/pontoon/insights/static/css/insights.css +++ b/pontoon/insights/static/css/insights.css @@ -96,6 +96,22 @@ background: var(--black-3); } + .cell { + vertical-align: bottom; + height: 44px; + + a { + color: var(--status-translated-alt); + } + + div { + margin-bottom: 6px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + } + &.show-score-view { .info-container.base-view { display: none; @@ -141,10 +157,6 @@ color: var(--status-error); } - &.equal { - color: var(--grey-1); - } - .fa-caret-up, .fa-caret-down { font-size: 1.4em; diff --git a/pontoon/insights/templates/insights/widgets/community_health_table.html b/pontoon/insights/templates/insights/widgets/community_health_table.html index c3c1ee5737..82c511650f 100644 --- a/pontoon/insights/templates/insights/widgets/community_health_table.html +++ b/pontoon/insights/templates/insights/widgets/community_health_table.html @@ -20,7 +20,7 @@ New - + Projects @@ -36,13 +36,11 @@ {% endmacro %} {% macro delta_span(delta, percent=False) %} - {% if delta is not none %} - - - {% if delta != 0 %} - {{ '+' if delta > 0 }}{{ delta }}{{ '%' if percent }} - {% endif %} - + {% if delta %} + + + {{ '+' if delta > 0 }}{{ delta }}{{ '%' if percent }} + {% endif %} {% endmacro %} @@ -77,7 +75,7 @@ {% macro item(locale, main_link, curr_snapshot=None, base_deltas=None, score_deltas=None, columns=None, class='limited') %} - +
{{ locale.code }}
diff --git a/pontoon/settings/base.py b/pontoon/settings/base.py index eac7cdab1e..3662ab34ae 100644 --- a/pontoon/settings/base.py +++ b/pontoon/settings/base.py @@ -1296,6 +1296,17 @@ def account_username(user): ENABLED_PROJECT_POINTS = float(os.environ.get("ENABLED_PROJECT_POINTS", 4.0)) COMPLETION_POINTS = float(os.environ.get("COMPLETION_POINTS", 46.0)) +KEY_PROJECT_SLUGS = os.environ.get( + "KEY_PROJECT_SLUGS", + "firefox-for-android," + "firefox-for-ios," + "mozilla-monitor-website," + "firefox-relay-website," + "firefox," + "mozilla-accounts," + "mozilla-vpn-client", +).split(",") + DEFAULT_AUTO_FIELD = "django.db.models.AutoField" # Used in the header of the Terminology (.TBX) files.