From 0b7e276b407fb0ebacc080d5aa347b1c06462fa2 Mon Sep 17 00:00:00 2001 From: Chan Ger Hean Date: Sun, 20 Dec 2020 22:51:05 +0800 Subject: [PATCH] Remove unused classes (#1363) Currently there exists some pug files which contain classes not referenced in any stylesheet or javascript code. Removing unused classes would improve the readability of code. Let's remove unused css classes from pug files. --- frontend/src/index.pug | 8 ++++---- frontend/src/static/css/panels.scss | 2 +- frontend/src/summary.pug | 12 ++++++------ frontend/src/tabs/authorship.pug | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/frontend/src/index.pug b/frontend/src/index.pug index ede95b8bc8..9877261835 100644 --- a/frontend/src/index.pug +++ b/frontend/src/index.pug @@ -68,16 +68,16 @@ html #tabs-wrapper(ref="tabWrapper", slot="right") .tab-content.panel-padding - .tab-panes - v-authorship#tab-authorship.tab-pane( + .tab-pane + v-authorship#tab-authorship( v-if="tabType === 'authorship'", v-bind:key="generateKey(tabInfo.tabAuthorship)", v-bind:info="tabInfo.tabAuthorship") - v-zoom#tab-zoom.tab-pane( + v-zoom#tab-zoom( v-else-if="tabType === 'zoom'", v-bind:key="generateKey(tabInfo.tabZoom)", v-bind:info="tabInfo.tabZoom") - #tab-empty.tab-pane(v-else) + #tab-empty(v-else) .title h2 Welcome to this RepoSense report! p The charts on the left show the contribution activities, grouped by repository and author. diff --git a/frontend/src/static/css/panels.scss b/frontend/src/static/css/panels.scss index 4999124dc1..c3a4d977a6 100644 --- a/frontend/src/static/css/panels.scss +++ b/frontend/src/static/css/panels.scss @@ -68,7 +68,7 @@ .tab-content { display: flex; - .tab-panes { + .tab-pane { text-align: left; width: 100%; } diff --git a/frontend/src/summary.pug b/frontend/src/summary.pug index f8ac83265d..87a86a34a1 100644 --- a/frontend/src/summary.pug +++ b/frontend/src/summary.pug @@ -2,7 +2,7 @@ form.summary-picker.mui-form--inline(onsubmit="return false;") .summary-picker__section .mui-textfield.search_box - input.summary-picker__search(type="text", v-on:change="updateFilterSearch", v-model="filterSearch") + input(type="text", v-on:change="updateFilterSearch", v-model="filterSearch") label search button.mui-btn.mui-btn--raised(type="button", v-on:click.prevent="resetFilterSearch") x .mui-select.grouping @@ -38,31 +38,31 @@ option(value="day") Day option(value="week") Week label granularity - .mui-textfield.summary-picker__date + .mui-textfield input(v-if="isSafariBrowser", type="text", placeholder="yyyy-mm-dd", v-bind:value="filterSinceDate", v-on:keyup.enter="updateTmpFilterSinceDate", onkeydown="formatInputDateOnKeyDown(event)", oninput="appendDashInputDate(event)", maxlength=10) input(v-else, type="date", name="since", v-bind:value="filterSinceDate", v-on:input="updateTmpFilterSinceDate", v-bind:min="minDate", v-bind:max="filterUntilDate") label since - .mui-textfield.summary-picker__date + .mui-textfield input(v-if="isSafariBrowser", type="text", placeholder="yyyy-mm-dd", v-bind:value="filterUntilDate", v-on:keyup.enter="updateTmpFilterUntilDate", onkeydown="formatInputDateOnKeyDown(event)", oninput="appendDashInputDate(event)", maxlength=10) input(v-else, type="date", name="until", v-bind:value="filterUntilDate", v-on:input="updateTmpFilterUntilDate", v-bind:min="filterSinceDate", v-bind:max="maxDate") label until - .mui-textfield.summary-picker__date + .mui-textfield a(v-on:click="resetDateRange") Reset date range .summary-picker__checkboxes.summary-picker__section label.filter-breakdown - input.mui-checkbox.summary-picker__checkbox(type="checkbox", v-model="filterBreakdown", + input.mui-checkbox(type="checkbox", v-model="filterBreakdown", v-on:change="setSummaryHash()") span breakdown by file type label.merge-group( v-bind:style="filterGroupSelection === 'groupByNone' ? { opacity:0.5 } : { opacity:1.0 }" ) - input.summary-picker__checkbox.mui-checkbox( + input.mui-checkbox( type="checkbox", v-model="allGroupsMerged", v-bind:disabled="filterGroupSelection === 'groupByNone'" diff --git a/frontend/src/tabs/authorship.pug b/frontend/src/tabs/authorship.pug index e0337baa26..b9820fab4b 100644 --- a/frontend/src/tabs/authorship.pug +++ b/frontend/src/tabs/authorship.pug @@ -37,7 +37,7 @@ v-model="filterType", v-on:change="indicateSearchBar(); updateSearchBarValue();" ) - .file-picker.mui-form--inline + .mui-form--inline input#search( type="search", placeholder="Filter by glob",