From 30b563c7d17b1fe169a77ef20e7cbe213cc241ff Mon Sep 17 00:00:00 2001 From: andreia Date: Wed, 25 Mar 2026 12:08:51 +0100 Subject: [PATCH 1/6] add event listener to toggle collapsed attribute in objective name tbody elements --- dashboard/dashboard/static/project-detail.css | 5 ++++- dashboard/dashboard/templates/base.html | 1 + dashboard/projects/templates/projects/project.html | 11 +++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/dashboard/dashboard/static/project-detail.css b/dashboard/dashboard/static/project-detail.css index ce44664..051811e 100644 --- a/dashboard/dashboard/static/project-detail.css +++ b/dashboard/dashboard/static/project-detail.css @@ -1,4 +1,7 @@ -table.objectives tr.objective td.name {background-color: #205067; color: white; font-weight: bold;} +table.objectives tr.objective td.name {background-color: #205067; color: white; font-weight: bold; cursor: pointer; user-select: none;} +table.objectives tr.objective td.name::before {content: "▼ "; font-size: 0.75em; opacity: 0.8;} +table.objectives tbody.collapsed tr.objective td.name::before {content: "▶ ";} +table.objectives tbody.collapsed tr:not(.objective) {display: none;} table.objectives tr.level {background-color: #f0f0f0; font-weight: bold;} table.objectives td p, th p {margin: .2rem 0} diff --git a/dashboard/dashboard/templates/base.html b/dashboard/dashboard/templates/base.html index 3e4f72a..e08b6f1 100644 --- a/dashboard/dashboard/templates/base.html +++ b/dashboard/dashboard/templates/base.html @@ -12,5 +12,6 @@ {% block content %}{% endblock %} + {% block eventlisteners %}{% endblock %} \ No newline at end of file diff --git a/dashboard/projects/templates/projects/project.html b/dashboard/projects/templates/projects/project.html index 1e5bce4..cb3fca4 100644 --- a/dashboard/projects/templates/projects/project.html +++ b/dashboard/projects/templates/projects/project.html @@ -58,3 +58,14 @@

{{ project }}

{% endblock content %} + +{% block eventlisteners %} + +{% endblock %} From cda868b9fde957e70f361b76d779be2eeb17287d Mon Sep 17 00:00:00 2001 From: andreia Date: Wed, 25 Mar 2026 12:38:58 +0100 Subject: [PATCH 2/6] save collapsed state to local storage --- .../projects/templates/projects/project.html | 31 +++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/dashboard/projects/templates/projects/project.html b/dashboard/projects/templates/projects/project.html index cb3fca4..93b7e92 100644 --- a/dashboard/projects/templates/projects/project.html +++ b/dashboard/projects/templates/projects/project.html @@ -61,11 +61,38 @@

{{ project }}

{% block eventlisteners %} {% endblock %} From 2c6aec071fbe70579d0d632586cd77f2c4ec363c Mon Sep 17 00:00:00 2001 From: andreia Date: Wed, 25 Mar 2026 13:12:39 +0100 Subject: [PATCH 3/6] add test --- .../projects/templates/projects/project.html | 8 +++- dashboard/test_browser.py | 37 +++++++++++++++++++ 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/dashboard/projects/templates/projects/project.html b/dashboard/projects/templates/projects/project.html index 93b7e92..b13392f 100644 --- a/dashboard/projects/templates/projects/project.html +++ b/dashboard/projects/templates/projects/project.html @@ -61,7 +61,9 @@

{{ project }}

{% block eventlisteners %}