Skip to content

Commit

Permalink
[Scorecards] Added tooltip to year variation element
Browse files Browse the repository at this point in the history
  • Loading branch information
lucascumsille committed Jan 22, 2025
1 parent e9fe493 commit 1957b84
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions scoring/templates/scoring/council.html
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ <h3 class="exclamation text-white">Visit us again on a bigger screen</h3>
<!-- TODO: Change text-success to text-dark if there is no variation -->
<!-- TODO: If there is no variation then display '-' -->
<!-- TODO Designer: Add tooltip to badge explaining this is a variation -->
<p class="badge small ms-1 mb-0 align-text-bottom bg-green-100 text-success">+5%</p>
<button type="button" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Variation with Action Scorecards 2023" class="badge small ms-1 mb-0 align-text-bottom bg-green-100 text-success border-0">+5%</button>
</td>
{% else %}
<td class="score border-bottom border-opacity-25 border-primary is--section-score">
Expand All @@ -293,7 +293,7 @@ <h3 class="exclamation text-white">Visit us again on a bigger screen</h3>
<!-- TODO: Change text-success to text-dark if there is no variation -->
<!-- TODO: If there is no variation then display '-' -->
<!-- TODO Designer: Add tooltip to badge explaining this is a variation -->
<p class="badge small ms-1 mb-0 align-text-bottom bg-green-100 text-success">+5%</p>
<button type="button" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Variation with Action Scorecards 2023" class="badge small ms-1 mb-0 align-text-bottom bg-green-100 text-success border-0">+5%</button>
</td>
{% endif %}

Expand All @@ -307,7 +307,7 @@ <h3 class="exclamation text-white">Visit us again on a bigger screen</h3>
<!-- TODO: If there is no variation then display '-' -->
<!-- TODO: If question didn't exist in previous years then let's add 'NA' with bg-gray-100 text-dark -->
<!-- TODO Designer: Add tooltip to badge explaining this is a variation -->
<p class="badge small ms-1 mb-0 align-text-bottom bg-green-100 text-success">+1</p>
<p button type="button" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Variation with Action Scorecards 2023" class="badge small ms-1 mb-0 align-text-bottom bg-green-100 text-success border-0">+1</button>
</td>
{% endfor %}

Expand Down Expand Up @@ -335,7 +335,7 @@ <h3 class="exclamation text-white">Visit us again on a bigger screen</h3>
<!-- TODO: If there is no variation then display '-' -->
<!-- TODO: If question didn't exist in previous years then let's add 'NA' with bg-gray-100 text-dark -->
<!-- TODO Designer: Add tooltip to badge explaining this is a variation -->
<p class="badge small ms-1 mb-0 align-text-bottom bg-green-100 text-success">+1</p>
<button type="button" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Variation with Action Scorecards 2023" class="badge small ms-1 mb-0 align-text-bottom bg-green-100 text-success border-0">+1</button>
</td>

{% for comparison in answer.comparisons %}
Expand All @@ -348,7 +348,7 @@ <h3 class="exclamation text-white">Visit us again on a bigger screen</h3>
<!-- TODO: If there is no variation then display '-' -->
<!-- TODO: If question didn't exist in previous years then let's add 'NA' with bg-gray-100 text-dark -->
<!-- TODO Designer: Add tooltip to badge explaining this is a variation -->
<p class="badge small ms-1 mb-0 align-text-bottom bg-green-100 text-success">+1</p>
<button type="button" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Variation with Action Scorecards 2023" class="badge small ms-1 mb-0 align-text-bottom bg-green-100 text-success border-0">+1</button>
</td>
{% endfor %}

Expand Down Expand Up @@ -378,27 +378,25 @@ <h3 class="exclamation text-white">Visit us again on a bigger screen</h3>
</td>
<td class="score border-bottom border-opacity-25 border-primary is--section-score">
{{ plan_score.weighted_total|floatformat:0 }}%
<span>{{ section.weighted_score|floatformat:0 }}%</span>
<!-- TODO: Change bg-green-100 to bg-red-100 if variation is negative -->
<!-- TODO: Change text-success to text-danger if variation is negative -->
<!-- TODO: Change bg-green-100 to bg-gray-100 if there is no variation -->
<!-- TODO: Change text-success to text-dark if there is no variation -->
<!-- TODO: If there is no variation then display '-' -->
<!-- TODO Designer: Add tooltip to badge explaining this is a variation -->
<p class="badge small ms-1 mb-0 align-text-bottom bg-green-100 text-success">+5%</p>
<button type="button" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Variation with Action Scorecards 2023" class="badge small ms-1 mb-0 align-text-bottom bg-green-100 text-success border-0">+5%</button>
</td>

{% for comparison in comparisons %}
<td class="d-none d-md-table-cell score border-bottom border-opacity-25 border-primary is--section-score">
{{ comparison.weighted_total|floatformat:0 }}%
<span>{{ section.weighted_score|floatformat:0 }}%</span>
<!-- TODO: Change bg-green-100 to bg-red-100 if variation is negative -->
<!-- TODO: Change text-success to text-danger if variation is negative -->
<!-- TODO: Change bg-green-100 to bg-gray-100 if there is no variation -->
<!-- TODO: Change text-success to text-dark if there is no variation -->
<!-- TODO: If there is no variation then display '-' -->
<!-- TODO Designer: Add tooltip to badge explaining this is a variation -->
<p class="badge small ms-1 mb-0 align-text-bottom bg-green-100 text-success">+5%</p>
<button type="button" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Variation with Action Scorecards 2023" class="badge small ms-1 mb-0 align-text-bottom bg-green-100 text-success border-0">+5%</button>
</td>
{% endfor %}

Expand Down

0 comments on commit 1957b84

Please sign in to comment.