This is an automated email from the ASF dual-hosted git repository.

sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-release.git


The following commit(s) were added to refs/heads/main by this push:
     new d5c5e77  Improve the display of check result toggle buttons
d5c5e77 is described below

commit d5c5e779ac5cfc28c4ab5d0d3d96ca4301f52fc7
Author: Sean B. Palmer <[email protected]>
AuthorDate: Mon May 12 16:22:19 2025 +0100

    Improve the display of check result toggle buttons
---
 atr/templates/report-selected-path.html | 26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)

diff --git a/atr/templates/report-selected-path.html 
b/atr/templates/report-selected-path.html
index 68b3683..63af4e5 100644
--- a/atr/templates/report-selected-path.html
+++ b/atr/templates/report-selected-path.html
@@ -70,11 +70,13 @@
                   type="button"
                   class="btn {% if status == 'success' and not 
all_primary_are_success %}btn-outline-success{% elif status == 'success' and 
all_primary_are_success %}btn-success{% else %}btn-{{ bs_status }}{% endif %}"
                   onclick="toggleStatusVisibility('primary', '{{ status }}')">
-            {% if status == 'success' and not all_primary_are_success %}
-              Show
-            {% else %}
-              Hide
-            {% endif %}
+            <span>
+              {% if status == 'success' and not all_primary_are_success %}
+                Show
+              {% else %}
+                Hide
+              {% endif %}
+            </span>
             {{ status|title }} (<code>{{ count }}</code>)
           </button>
         {% endif %}
@@ -238,11 +240,13 @@
                       type="button"
                       class="btn {% if status == 'success' and not 
all_member_are_success %}btn-outline-success{% elif status == 'success' and 
all_member_are_success %}btn-success{% else %}btn-{{ bs_status }}{% endif %}"
                       onclick="toggleStatusVisibility('member', '{{ status 
}}')">
-                {% if status == 'success' and not all_member_are_success %}
-                  Show
-                {% else %}
-                  Hide
-                {% endif %}
+                <span>
+                  {% if status == 'success' and not all_member_are_success %}
+                    Show
+                  {% else %}
+                    Hide
+                  {% endif %}
+                </span>
                 {{ status|title }} (<code>{{ count }}</code>)
               </button>
             {% endif %}
@@ -327,7 +331,7 @@
           }
           const cnt = cntMatch[0];
           const newButtonAction = elementsCurrentlyHidden ? "Hide" : "Show";
-          btn.textContent = `${newButtonAction} 
${status.charAt(0).toUpperCase()+status.slice(1)} ${cnt}`;
+          btn.querySelector("span").textContent = newButtonAction;
           if (newButtonAction === "Hide") {
               btn.classList.remove(`btn-outline-${bsSt}`);
               btn.classList.add(`btn-${bsSt}`);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to