Skip to content

Commit

Permalink
Visual changes, mostly CSS, to make tables more legible
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalchevrel committed Sep 11, 2024
1 parent f15c0cb commit f617f4e
Show file tree
Hide file tree
Showing 6 changed files with 123 additions and 114 deletions.
2 changes: 1 addition & 1 deletion app/views/templates/base.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/assets/bootstrap/css/bootstrap.min.css" media="screen">
<link rel="stylesheet" href="/assets/bootstrap/css/bootstrap-icons.css" media="screen">
<link rel="stylesheet" href="/style/base.css?version=34" type="text/css" media="all" />
<link rel="stylesheet" href="/style/base.css?version=35" type="text/css" media="all" />
<link rel="icon" type="image/svg+xml" href="/assets/img/site_icon.svg" />
<link rel="apple-touch-icon" type="image/png" href="/assets/img/site_icon.png" />
<link rel="author" href="humans.txt" />
Expand Down
36 changes: 19 additions & 17 deletions app/views/templates/calendar.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,23 @@

{% block main %}
{% set year = 'now'|date('Y') %}
<table class="table table-light table-striped caption-top table-hover table-sm w-auto justify-content-center mt-4 text-center">
{% set table_header = 'text-secondary-emphasis fw-semibold' %}

<table class="table table-light table-fxt-clean caption-top table-hover table-sm w-auto justify-content-center mt-4 text-center">
<caption class="h4 text-center text-warning">Upcoming releases</caption>
<thead>
<tr>
<th colspan="8" class="text-center table-warning">{{ year }}</th>
</tr>
<tr>
<th scope="col" class="px-4">Quarter</th>
<th scope="col" class="px-4">Version</th>
<th scope="col" class="px-4">Matching <abbr title="Extended Support Release">ESR</abbr></th>
<th scope="col" class="px-4">Release Owner</th>
<th scope="col" class="px-4">Nightly starts</th>
<th scope="col" title="The Nightly soft code freeze is typically during the week prior to merge day. During this period high-risk patches should avoid landing until after the Nightly version bump lands on mozilla-central on merge day">Soft code freeze</th>
<th scope="col" class="px-4">Beta starts</th>
<th scope="col" class="px-4">Release day</th>
<th scope="col" class="px-4 {{ table_header }}">Quarter</th>
<th scope="col" class="px-4 {{ table_header }}">Version</th>
<th scope="col" class="px-4 {{ table_header }}">Matching <abbr title="Extended Support Release">ESR</abbr></th>
<th scope="col" class="px-4 {{ table_header }}">Release Owner</th>
<th scope="col" class="px-4 {{ table_header }}">Nightly starts</th>
<th scope="col" title="The Nightly soft code freeze is typically during the week prior to merge day. During this period high-risk patches should avoid landing until after the Nightly version bump lands on mozilla-central on merge day" class="px-4 {{ table_header }}">Soft code freeze</th>
<th scope="col" class="px-4 {{ table_header }}">Beta starts</th>
<th scope="col" class="px-4 {{ table_header }}">Release day</th>
</tr>
</thead>
<tbody>
Expand All @@ -46,7 +48,7 @@
<tr>
{% if check != values.quarter %}
{% set rowspan = upcoming_quarters[values.quarter] %}
<th rowspan="{{ rowspan}}" class="force-default-bg align-middle border-end">{{ values.quarter | split('-', 2)[1] }}</th>
<th rowspan="{{ rowspan}}" class="force-default-bg align-middle border-end {{ table_header }}">{{ values.quarter | split('-', 2)[1] }}</th>
{% set check = values.quarter %}
{% endif %}
<td><a href="/release/?version={{ values.version }}">{{ values.version }}</a></td>
Expand Down Expand Up @@ -94,16 +96,16 @@
{% set date_pattern = 'YYYY-MM-dd' %}
<details class="justify-content-center mt-4 text-center" id="Past_branch_dates">
<summary>Click to toggle past releases table data</summary>
<table class="table caption-top table-light table-striped table-hover table-bordered table-sm w-auto justify-content-center mt-4 text-center">
<table class="table caption-top table-light table-fxt-clean table-hover table-bordered table-sm w-auto justify-content-center mt-4 text-center">
<caption class="h4 text-center text-warning">Past releases</caption>
<thead>
<tr>
<th scope="col" class="px-4">Version</th>
<th scope="col" class="px-4">Matching ESR</th>
<th scope="col" class="px-4">Release owner</th>
<th scope="col" class="px-4">Nightly starts</th>
<th scope="col" class="px-4">Beta starts</th>
<th scope="col" class="px-4">Release day</th>
<th scope="col" class="px-4 {{ table_header }}">Version</th>
<th scope="col" class="px-4 {{ table_header }}">Matching ESR</th>
<th scope="col" class="px-4 {{ table_header }}">Release owner</th>
<th scope="col" class="px-4 {{ table_header }}">Nightly starts</th>
<th scope="col" class="px-4 {{ table_header }}">Beta starts</th>
<th scope="col" class="px-4 {{ table_header }}">Release day</th>
</tr>
</thead>
<tbody>
Expand Down
32 changes: 17 additions & 15 deletions app/views/templates/esr_release.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,29 @@
{% endif %}

<div class="w-50 alert alert-primary mx-auto text-center" role="alert">Version shipping to end-users on the <b class="text-danger">ESR</b> channel</div>
<table class="table table-light table-striped table-bordered table-sm w-50 justify-content-center">

{% set table_header = 'text-secondary-emphasis fw-semibold' %}

<table class="table table-light table-fxt-clean table-bordered table-sm w-50 justify-content-center">
<tr class="table-warning">
<th class="{{ table_header }}">Last release</th>
<td title="{{ release_date|format_date('full', locale='en') }}">{{ release_date|format_date('long', locale='en') }}</td>
</tr>
{% if constant('ESR_NEXT') != "" %}
<tr>
<th class="w-auto">Latest version (old branch)</th>
<tr class="bg-warning">
<th class="{{ table_header }}">Latest version (old branch)</th>
<td> {{ current_ESR }}</td>
</tr>
<tr>
<th class="w-auto">Latest version (new branch)</th>
<th class="{{ table_header }}">Latest version (new branch)</th>
<td> {{ next_ESR }}</td>
</tr>
<tr>
{% else %}
<tr>
<th class="w-auto">Latest version</th>
<th class="{{ table_header }}">Latest version</th>
<td> {{ current_ESR }}</td>
</tr>
<tr>
{% endif %}
<th class="w-auto">Release Date</th>
<td title="{{ release_date|format_date('full', locale='en') }}">{{ release_date|format_date('long', locale='en') }}</td>
</tr>
</table>

{% if current_ESR|number_format == 115 %}
Expand All @@ -61,15 +63,15 @@
<div class="w-50 mt-4 mx-auto " role="alert">{{ alert|raw }}</div>


<table class="table table-light table-striped table-bordered table-sm w-50 justify-content-center mt-4">
<table class="table table-light table-fxt-clean table-bordered table-sm w-50 justify-content-center mt-4">
<tr>
<th colspan="4" class="text-center table-warning force-default-bg">Releases calendar</th>
</tr>
<tr>
<th>Firefox</th>
<th>ESR</th>
<th>Old ESR</th>
<th>Date</th>
<th class="text-center">Firefox</th>
<th class="text-center">ESR</th>
<th class="text-center">Old ESR</th>
<th class="text-end">Date</th>
</tr>

{% for key, values in esr_calendar %}
Expand Down
90 changes: 45 additions & 45 deletions app/views/templates/future_release.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -126,28 +126,41 @@
{% endif %}
</div>
{% endif %}

<table class="table table-light table-striped table-sm w-50 justify-content-center">
<tr>
<th class="w-auto">Release Date</th><td title="{{ release_date|format_date('full', locale='en') }}">{{ release_date|format_date('long', locale='en') }}</td>
{% set table_header = 'text-secondary-emphasis fw-semibold' %}
<table class="table table-light table-fxt-clean table-sm w-50 justify-content-center">
<tr class='table-warning'>
<th class="{{ table_header }}">Release Date</th><td title="{{ release_date|format_date('full', locale='en') }}">{{ release_date|format_date('long', locale='en') }}</td>
</tr>
<tr>
<th class="w-auto">Release Owner</th><td>{{ release_owner }}</td>
<th class="{{ table_header }}">Release Owner</th><td>{{ release_owner }}</td>
</tr>
{% if OLDER_ESR %}
<tr>
<th>Nightly cycle length</th><td>{{ nightly_cycle_length|number_format }} weeks</td>
<th class="{{ table_header }}">Corresponding ESR releases</th>
{% if OLDER_ESR|number_format == 115 %}
<td>{{ ESR }} &middot;
<span
data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-html="true"
title="ESR 115 support is extended for <i>Windows 7-8.1</i> and <i>macOS 10.12-10.14</i> up to <b>March 2025</b>."
class='text-muted'>
{{ OLDER_ESR }}<sup class="text-danger">?</sup></span>

</td>
{% else %}
<td>{{ ESR }} &middot; {{ OLDER_ESR }} </td>
{% endif %}
</tr>

{% else %}
<tr>
<th>Beta cycle length</th><td>{{ beta_cycle_length|number_format }} weeks</td>
<th class="{{ table_header }}">Corresponding ESR release</th>
<td>{{ ESR }}</td>
{% endif %}
</tr>

{% if channel == 'beta' %}
<tr>
<th>Bugs fixed in Nightly</th>
<td>{{ nightly_fixes.bug_fixes|length }}</td>
</tr>
<tr>
<th>Current Beta</th>
<th class="{{ table_header }}">Current Beta</th>
<td>
{% if date() > date(cycle_dates.rc_gtb) %}
{{ constant('FIREFOX_BETA')|number_format(1) }} <small>Release Candidate</small>
Expand All @@ -159,48 +172,35 @@
{% endif %}
</td>
</tr>
<tr>
<th class="{{ table_header }}">Bugs fixed in Nightly</th>
<td>{{ nightly_fixes.bug_fixes|length }}</td>
</tr>
{% endif %}
<tr>
<th class="{{ table_header }}">Nightly cycle length</th><td>{{ nightly_cycle_length|number_format }} weeks</td>
</tr>
<tr>
<th class="{{ table_header }}">Beta cycle length</th><td>{{ beta_cycle_length|number_format }} weeks</td>
</tr>

{% if release == '140' %}
<tr class="table-warning">
<td colspan="2" class="text-center fw-bold">{{ release }} is the next <abbr title="Extended Support Release" class="initialism">ESR</abbr></td>
</tr>
{% endif %}

{% if OLDER_ESR %}
<tr>
<th>Corresponding ESR releases</th>
{% if OLDER_ESR|number_format == 115 %}
<td>{{ ESR }} &middot;
<span
data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-html="true"
title="ESR 115 support is extended for <i>Windows 7-8.1</i> and <i>macOS 10.12-10.14</i> up to <b>March 2025</b>."
class='text-muted'>
{{ OLDER_ESR }}<sup class="text-danger">?</sup></span>

</td>
{% else %}
<td>{{ ESR }} &middot; {{ OLDER_ESR }} </td>
{% endif %}
</tr>

{% else %}
<tr>
<th>Corresponding ESR release</th>
<td>{{ ESR }}</td>
{% endif %}
</tr>

{% if channel == 'nightly' %}
<tr>
<th>Release notes</th>
<th class="{{ table_header }}">Release notes</th>
<td><a href="https://www.mozilla.org/firefox/nightly/notes/">Nightly notes</a></td>
</tr>
{% endif %}

{% if channel == 'beta' %}
<tr>
<th>Release notes</th>
<th class="{{ table_header }}">Release notes</th>
<td><a href="https://www.mozilla.org/firefox/beta/notes/">Beta notes</a></td>
</tr>
{% endif %}
Expand Down Expand Up @@ -296,32 +296,32 @@

{% set next_milestone = true %}

<table class="table table-light table-striped table-sm w-50 justify-content-center mt-4">
<table class="table table-light table-fxt-clean table-hover table-sm w-50 justify-content-center mt-4">
<tr>
<th colspan="2" class="text-center table-warning force-default-bg">Milestones<br><small class="fw-normal">Desktop, Android & iOS</small></th>
<th colspan="2" class="text-center table-warning force-default-bg fw-semibold">Milestones<br><small class="fw-normal">Desktop, Android & iOS</small></th>
</tr>
{% for key, value in cycle_dates %}
{% if key != 'version' %}
{% set extra = '' %}

{% if key == 'soft_code_freeze' %}
{% set extra = ' <small class="badge bg-warning text-dark">Draft beta release notes</small>' %}
{% set extra = ' <small class="badge bg-warning text-dark fw-semibold">Draft beta release notes</small>' %}
{% endif %}

{% if release == 116 and key == 'beta_5' %}
{% set extra = ' <small class="badge bg-warning text-dark">Last early beta</small>' %}
{% set extra = ' <small class="badge bg-warning text-dark fw-semibold">Last early beta</small>' %}
{% endif %}

{% if key == 'beta_6' and release != 116 %}
{% set extra = ' <small class="badge bg-warning text-dark">Last early beta</small>' %}
{% set extra = ' <small class="badge bg-warning text-dark fw-semibold">Last early beta</small>' %}
{% endif %}

{% if key == 'beta_9' %}
{% set extra = ' <small class="badge bg-warning text-dark">Last beta uplifts <span class="fw-light">(sec-approval request deadline)</span></small>' %}
{% set extra = ' <small class="badge bg-warning text-dark fw-semibold">Last beta uplifts <span class="fw-light">(sec-approval request deadline)</span></small>' %}
{% endif %}

{% if key == 'rc' %}
{% set extra = ' <small class="badge bg-warning text-dark">Release notes finalized</small>' %}
{% set extra = ' <small class="badge bg-warning text-dark fw-semibold">Release notes finalized</small>' %}
{% endif %}

<tr>
Expand Down Expand Up @@ -351,7 +351,7 @@
{% endif %}

{% else %}
<th>
<th class="{{ table_header }}">
<details{{ next_milestone and channel in ['nightly', 'beta'] ? ' open' }}>
<summary>{{ cycle_labels[key]|raw }}{{ extra|raw }}</summary>
<p>{{ cycle_descriptions[key]|raw }}</p>
Expand Down
Loading

0 comments on commit f617f4e

Please sign in to comment.