Skip to content

Commit

Permalink
fix(ui): badge -> badge rounded-pill (#4076)
Browse files Browse the repository at this point in the history
* ui: badge -> badge rounded-pill

To make badges look a little less like small buttons.

* Rip out copy&paste error
  • Loading branch information
larseggert authored Jun 15, 2022
1 parent 7fc601e commit 6e97628
Show file tree
Hide file tree
Showing 51 changed files with 116 additions and 116 deletions.
2 changes: 1 addition & 1 deletion ietf/doc/templatetags/ballot_icon.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,6 @@ def auth48_alert_badge(doc):

rfced_state = doc.get_state_slug('draft-rfceditor')
if rfced_state == 'auth48':
return mark_safe('<span class="badge bg-info" title="AUTH48">AUTH48</span>')
return mark_safe('<span class="badge rounded-pill bg-info" title="AUTH48">AUTH48</span>')

return ''
2 changes: 1 addition & 1 deletion ietf/static/js/password_strength.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

widget
.find(".label")
.addClass("badge")
.addClass("badge rounded-pill")
.removeClass("label");

widget
Expand Down
2 changes: 1 addition & 1 deletion ietf/templates/doc/charter/submit.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ <h1>Charter submission</h1>
<th scope="row">State</th>
<td>
{{ group.state.name }}
{% if requested_close %}<div class="badge bg-info">In the process of being closed</div>{% endif %}
{% if requested_close %}<div class="badge rounded-pill bg-info">In the process of being closed</div>{% endif %}
</td>
</tr>
</tbody>
Expand Down
6 changes: 3 additions & 3 deletions ietf/templates/doc/document_ballot_content.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="col-md-2 d-none d-md-block d-sm-block d-lg-block d-xl-block d-xxl-block">
{% for n, positions in position_groups %}
<p class="h5">
<span class="badge {{ n|pos_to_label_format }}">{{ n.name }}</span>
<span class="badge rounded-pill {{ n|pos_to_label_format }}">{{ n.name }}</span>
</p>
{% for p in positions %}
<div class="balloter-name mb-2">
Expand Down Expand Up @@ -90,7 +90,7 @@
{{ p.balloter.plain_name }}
<span class="float-end">
{% if p.old_positions %}<span class="text-muted small">(was {{ p.old_positions|join:", " }})</span>{% endif %}
<span class="badge {{ p.pos|pos_to_label_format }}">{{ p.pos }}</span>
<span class="badge rounded-pill {{ p.pos|pos_to_label_format }}">{{ p.pos }}</span>
{% if user|has_role:"Secretariat" %}
<a href="{% url "ietf.doc.views_ballot.edit_position" name=doc.name ballot_id=ballot.pk %}?balloter={{ p.balloter.pk }}"
title="Click to edit the position of {{ p.balloter.plain_name }}"
Expand Down Expand Up @@ -162,7 +162,7 @@
<span class="text-muted">({{ p.balloter.plain_name }}; former steering group member)</span>
<span class="float-end">
{% if p.old_positions %}<span class="text-muted small">(was {{ p.old_positions|join:", " }})</span>{% endif %}
<span class="badge {{ p.pos|pos_to_label_format }}">{{ p.pos }}</span>
<span class="badge rounded-pill {{ p.pos|pos_to_label_format }}">{{ p.pos }}</span>
{% if user|has_role:"Secretariat" %}
<a href="{% url "ietf.doc.views_ballot.edit_position" name=doc.name ballot_id=ballot.pk %}?balloter={{ p.balloter.pk }}"
title="Click to edit the position of {{ p.balloter.plain_name }}"
Expand Down
2 changes: 1 addition & 1 deletion ietf/templates/doc/document_bofreq.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<td class="edit"></td>
<td>
{{ doc.get_state.slug|capfirst }} BOF request
{% if snapshot %}<span class="badge bg-warning">Snapshot</span>{% endif %}
{% if snapshot %}<span class="badge rounded-pill bg-warning">Snapshot</span>{% endif %}
</td>
</tr>
<tr>
Expand Down
6 changes: 3 additions & 3 deletions ietf/templates/doc/document_charter.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<th scope="row">
{{ group.name }} {{ group.type.name }}
<a href="{{ group.about_url }}">({{ group.acronym }})</a>
{% if snapshot %}<span class="badge bg-warning">Snapshot</span>{% endif %}
{% if snapshot %}<span class="badge rounded-pill bg-warning">Snapshot</span>{% endif %}
</th>
</tr>
<tr>
Expand Down Expand Up @@ -94,8 +94,8 @@
{% else %}
No document state
{% endif %}
{% if chartering == "initial" %}<span class="badge bg-info">Initial chartering</span>{% endif %}
{% if chartering == "rechartering" %}<span class="badge bg-info">Rechartering</span>{% endif %}
{% if chartering == "initial" %}<span class="badge rounded-pill bg-info">Initial chartering</span>{% endif %}
{% if chartering == "rechartering" %}<span class="badge rounded-pill bg-info">Rechartering</span>{% endif %}
</td>
</tr>
</tbody>
Expand Down
4 changes: 2 additions & 2 deletions ietf/templates/doc/document_conflict_review.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
<td>
<a href="{% url "ietf.doc.views_doc.document_main" name=conflictdoc.canonical_name %}">
{% if conflictdoc.get_state_slug == 'rfc' %}{{ conflictdoc.canonical_name|prettystdname }}{% else %}{{ conflictdoc.canonical_name }}-{{ conflictdoc.rev }}{% endif %}</a>
<span class="badge bg-info">{{ conflictdoc.stream }} stream</span>
{% if snapshot %}<span class="badge bg-warning">Snapshot</span>{% endif %}
<span class="badge rounded-pill bg-info">{{ conflictdoc.stream }} stream</span>
{% if snapshot %}<span class="badge rounded-pill bg-warning">Snapshot</span>{% endif %}
</td>
</tr>
<tr>
Expand Down
8 changes: 4 additions & 4 deletions ietf/templates/doc/document_draft.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@
(Publication date unknown)
{% endif %}
{% if has_verified_errata %}
<a class="badge bg-danger text-decoration-none text-light"
<a class="badge rounded-pill bg-danger text-decoration-none text-light"
href="https://www.rfc-editor.org/errata_search.php?rfc={{ doc.rfc_number }}" title="Click to view errata." rel="nofollow">
Errata
</a>
{% elif has_errata %}
<a class="badge bg-warning text-decoration-none text-light"
<a class="badge rounded-pill bg-warning text-decoration-none text-light"
href="https://www.rfc-editor.org/errata_search.php?rfc={{ doc.rfc_number }}" title="Click to view errata." rel="nofollow">
Errata
</a>
Expand Down Expand Up @@ -588,7 +588,7 @@
href="{% url 'ietf.doc.views_doc.document_shepherd_writeup' name=doc.name %}">
Show
</a>
<span class="badge bg-secondary">Last changed {{ shepherd_writeup.time|date:"Y-m-d" }}</span>
<span class="badge rounded-pill bg-secondary">Last changed {{ shepherd_writeup.time|date:"Y-m-d" }}</span>
{% else %}
<span class="text-muted">
(None)
Expand Down Expand Up @@ -1008,7 +1008,7 @@
</i>
IPR
{% if doc.related_ipr %}
<span class="badge">
<span class="badge rounded-pill">
{{ doc.related_ipr|length }}
</span>
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion ietf/templates/doc/document_material.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<a href="{{ doc.group.about_url }}">({{ doc.group.acronym }})</a>
{{ doc.group.type.name }}
{% endif %}
{% if snapshot %}<span class="badge bg-warning">Snapshot</span>{% endif %}
{% if snapshot %}<span class="badge rounded-pill bg-warning">Snapshot</span>{% endif %}
</td>
</tr>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion ietf/templates/doc/document_referenced_by.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ <h1>References to {{ alias_name }}</h1>
<a href="{% url 'ietf.doc.views_doc.document_main' name=name %}">{{ name|prettystdname }}</a>
{% if ref.target.name != alias_name %}
<br>
<span class="badge bg-info">As {{ ref.target.name }}</span>
<span class="badge rounded-pill bg-info">As {{ ref.target.name }}</span>
{% endif %}
</td>
<td>
Expand Down
2 changes: 1 addition & 1 deletion ietf/templates/doc/document_status_change.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</td>
<th scope="row">
{{ doc.title }}
{% if snapshot %}<span class="badge bg-warning">Snapshot</span>{% endif %}
{% if snapshot %}<span class="badge rounded-pill bg-warning">Snapshot</span>{% endif %}
</th>
</tr>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion ietf/templates/doc/review/request_info.html
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@
{{ assignment.state.name }}
</span>
{% if snapshot %}
<span class="badge bg-warning">
<span class="badge rounded-pill bg-warning">
Snapshot
</span>
{% endif %}
Expand Down
6 changes: 3 additions & 3 deletions ietf/templates/doc/review_assignment_summary.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@
{% endif %}
-{{ review_assignment.reviewed_rev }}){% endif %}</a>
{% if review_assignment.state_id == "part-completed" %}
<span class="ms-1 badge bg-secondary">Partially completed</span>
<span class="badge rounded-pill ms-1 bg-secondary">Partially completed</span>
{% endif %}
{% if review_assignment.result %}
<span class="ms-1 badge {% if review_assignment.result.name|slice:5|slugify == 'ready' %}bg-success{% else %}bg-info{% endif %}">
<span class="badge rounded-pill ms-1 {% if review_assignment.result.name|slice:5|slugify == 'ready' %}bg-success{% else %}bg-info{% endif %}">
{{ review_assignment.result.name }}
</span>
{% endif %}
{% else %}
<a class="text-muted"
href="{% url 'ietf.doc.views_review.review_request' review_assignment.review_request.doc.name review_assignment.review_request.pk %}">
{{ review_assignment.review_request.team.acronym|upper }} {{ review_assignment.review_request.type.name }} Review</a>
<span class="ms-1 badge bg-secondary">
<span class="badge rounded-pill ms-1 bg-secondary">
Incomplete, due {{ review_assignment.review_request.deadline|date:"Y-m-d" }}
</span>
{% endif %}
Expand Down
10 changes: 5 additions & 5 deletions ietf/templates/doc/search/search_result_row.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@
{% endcomment %}
<b>{{ doc.title }}</b>
{% if doc.has_verified_errata %}
<a class="badge bg-danger text-decoration-none text-light float-end"
<a class="badge rounded-pill bg-danger text-decoration-none text-light float-end"
href="https://www.rfc-editor.org/errata_search.php?rfc={{ doc.rfc_number }}">
Errata
</a>
{% elif doc.has_errata %}
<a class="badge bg-warning text-decoration-none text-light float-end"
<a class="badge rounded-pill bg-warning text-decoration-none text-light float-end"
href="https://www.rfc-editor.org/errata_search.php?rfc={{ doc.rfc_number }}">
Errata
</a>
Expand Down Expand Up @@ -124,19 +124,19 @@
{% if doc.latest_revision_date|timesince_days|new_enough:request %}
<br>
<div class="float-end">
<span class="badge bg-success">New</span>
<span class="badge rounded-pill bg-success">New</span>
</div>
{% endif %}
{% if doc.get_state_slug == "active" and doc.expirable and doc.expires|timesince_days|expires_soon:request %}
<br>
<span class="badge bg-warning">Expires soon</span>
<span class="badge rounded-pill bg-warning">Expires soon</span>
{% endif %}
</td>
{% include "doc/search/status_columns.html" %}
<td class="text-center d-none d-sm-table-cell">
{% if doc.related_ipr %}
<a href="{% url "ietf.ipr.views.search" %}?submit=draft&amp;id={{ doc.name }}">
<span class="badge bg-info">{{ doc.related_ipr|length }}</span>
<span class="badge rounded-pill bg-info">{{ doc.related_ipr|length }}</span>
</a>
{% endif %}
</td>
Expand Down
4 changes: 2 additions & 2 deletions ietf/templates/doc/search/status_columns.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@
{% for review_assignment in doc.review_assignments %}
{% if review_assignment.state_id == "completed" or review_assignment.state_id == "part-completed" %}
<span title="{{ review_assignment.review_request.team.acronym|upper }} {{ review_assignment.review_request.type.name }} review {% if review_assignment.reviewed_rev and review_assignment.reviewed_rev != current_rev or review_assignment.review_request.doc.name != current_doc_name %}of {% if review_assignment.review_request.doc.name != current_doc_name %}{{ review_assignment.review_request.doc.name }}{% endif %}-{{ review_assignment.reviewed_rev }}{% endif %}: {{review_assignment.result}}"
class="badge {% if review_assignment.result.name|slice:5|slugify == 'ready' %}bg-success{% elif review_assignment.result.name|slice:9|slugify == 'not-ready' %}bg-danger{% elif review_assignment.result.name|slice:10|slugify == 'has-issues' %}bg-warning{% else %}bg-info{% endif %}">
class="badge rounded-pill {% if review_assignment.result.name|slice:5|slugify == 'ready' %}bg-success{% elif review_assignment.result.name|slice:9|slugify == 'not-ready' %}bg-danger{% elif review_assignment.result.name|slice:10|slugify == 'has-issues' %}bg-warning{% else %}bg-info{% endif %}">
{% else %}
<span title="Incomplete, due {{ review_assignment.review_request.deadline|date:"Y-m-d" }}" class="badge bg-secondary">
<span title="Incomplete, due {{ review_assignment.review_request.deadline|date:"Y-m-d" }}" class="badge rounded-pill bg-secondary">
{% endif %}
<a class="text-reset text-decoration-none" href="{% if review_assignment.review %}{% url 'ietf.doc.views_doc.document_main' review_assignment.review.name %}{% else %}{% url 'ietf.doc.views_review.review_request' review_assignment.review_request.doc.name review_assignment.review_request.pk %}{% endif %}">
{{ review_assignment.review_request.team.acronym }}
Expand Down
2 changes: 1 addition & 1 deletion ietf/templates/group/active_wgs.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h3 class="mt-3 navskip">
{% for ad in area.ads_and_pre_ads %}
<li>
{% person_link ad.person %}
{% if ad.name == "pre-ad" %}<span class="badge bg-info">Incoming AD</span>{% endif %}
{% if ad.name == "pre-ad" %}<span class="badge rounded-pill bg-info">Incoming AD</span>{% endif %}
</li>
{% endfor %}
</ul>
Expand Down
4 changes: 2 additions & 2 deletions ietf/templates/group/all_status.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h2 class="mt-3">{{ area_item.grouper.name }} ({{ area_item.grouper.acronym|uppe
<div class="card-header">
{{ rpt.group.acronym }}
{% if rpt.group.state.slug != "active" %}
<span class="badge bg-success">{{ rpt.group.state.slug|upper }}</span>
<span class="badge rounded-pill bg-success">{{ rpt.group.state.slug|upper }}</span>
{% endif %}
{{ rpt.time|date:"Y-m-d" }}
</div>
Expand All @@ -33,7 +33,7 @@ <h2 class="mt-3">Internet Research Task Force (IRTF)</h2>
<div class="card-header">
{{ rpt.group.acronym }}
{% if rpt.group.state.slug != "active" %}
<span class="badge bg-success">{{ rpt.group.state.slug|upper }}</span>
<span class="badge rounded-pill bg-success">{{ rpt.group.state.slug|upper }}</span>
{% endif %}
{{ rpt.time|date:"Y-m-d" }}
</div>
Expand Down
4 changes: 2 additions & 2 deletions ietf/templates/group/customize_workflow.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ <h2 class="mt-5">States</h2>
{{ state.name }}
</span>
{% if not state.used %}<span class="text-muted">(not used in {{ group.acronym }})</span>{% endif %}
{% if state.mandatory %}<span class="badge bg-success">Mandatory</span>{% endif %}
{% if state.mandatory %}<span class="badge rounded-pill bg-success">Mandatory</span>{% endif %}
</td>
<td class="next-states">
{% if state.used_next_states %}
Expand Down Expand Up @@ -79,7 +79,7 @@ <h2 class="mt-5">States</h2>
<input class="form-check-input" type="checkbox" name="next_states" value="{{ s.pk }}" id="id-{{ s.pk }}-{{ state.pk }}" {% if checked %} checked{% endif %}>
<label class="form-check-label" for="id-{{ s.pk }}-{{ state.pk }}">
{{ s.name }}
{% if default %}<span class="badge bg-secondary">Default</span>{% endif %}
{% if default %}<span class="badge rounded-pill bg-secondary">Default</span>{% endif %}
</label>
</div>
{% endfor %}
Expand Down
8 changes: 4 additions & 4 deletions ietf/templates/group/edit_milestones.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ <h1>{{ title }}</h1>
<div class="row milestone{% if form.delete.data %} delete{% endif %}">
<div class="due handle col-md-2 col-form-label col-form-label-md">
{% if form.milestone.resolved %}
<span class="badge bg-success">{{ form.milestone.resolved }}</span>
<span class="badge rounded-pill bg-success">{{ form.milestone.resolved }}</span>
{% elif group.uses_milestone_dates and form.milestone.due %}
<b>{{ form.milestone.due|date:"M Y" }}</b>
{% endif %}
Expand All @@ -74,12 +74,12 @@ <h1>{{ title }}</h1>
<b>{{ form.milestone.desc|urlize_ietf_docs }}</b>
{% if form.needs_review %}
<span title="This milestone is not active yet, awaiting {{ reviewer }} acceptance"
class="badge bg-warning">
class="badge rounded-pill bg-warning">
Awaiting accept
</span>
{% endif %}
{% if form.changed %}<span class="badge bg-info">Changed</span>{% endif %}
{% if form.delete.data %}<span class="badge bg-danger">Deleted</span>{% endif %}
{% if form.changed %}<span class="badge rounded-pill bg-info">Changed</span>{% endif %}
{% if form.delete.data %}<span class="badge rounded-pill bg-danger">Deleted</span>{% endif %}
{% for d in form.docs_names %}<div class="doc">{{ d }}</div>{% endfor %}
</div>
</div>
Expand Down
Loading

0 comments on commit 6e97628

Please sign in to comment.