Skip to content

Commit

Permalink
Merge pull request #11625 from chadlwilson/slimmer-fonts
Browse files Browse the repository at this point in the history
Reduce CSS size of bundles
  • Loading branch information
chadlwilson committed Jun 2, 2023
2 parents 045008d + 0f755ac commit c22eea2
Show file tree
Hide file tree
Showing 49 changed files with 105 additions and 2,494 deletions.
15 changes: 1 addition & 14 deletions server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ import groovy.json.JsonSlurper
import org.eclipse.jgit.api.Git
import org.gradle.util.TextUtil

import java.nio.file.FileSystems

import static org.jruby.runtime.Constants.RUBY_MAJOR_VERSION

description = 'GoCD Server'
Expand Down Expand Up @@ -430,12 +428,6 @@ task integrationTest(type: Test) { thisTask ->
}

doFirst {
def excludes = [
'com/thoughtworks/go/server/materials/MaterialDatabaseGitUpdaterTest.java',
'com/thoughtworks/go/server/materials/MaterialDatabaseGitWithSubmodulesUpdaterTest.java',
'com/thoughtworks/go/server/materials/MaterialDatabaseSvnWithExternalsUpdaterTest.java'
].collect { eachExclude -> FileSystems.getDefault().getPath(eachExclude) }

def files = project.files([])
project.sourceSets[thisTask.name].java.srcDirs.each { srcDir ->
files = files.plus(project.fileTree(dir: srcDir, includes: ['**/*.java']))
Expand All @@ -446,12 +438,6 @@ task integrationTest(type: Test) { thisTask ->
text.contains("@Test") && !(text.contains("SpringExtension") || text.contains("SpringJUnitJupiterConfig") || text.contains("@ContextConfiguration"))
}

badFiles.removeIf { badFile ->
excludes.any { eachExclude ->
badFile.toPath().endsWith(eachExclude)
}
}

if (!badFiles.isEmpty()) {
throw new GradleException("${thisTask} is not supposed to contain any unit tests. The following files contained what looks like unit test code:\n${badFiles.collect { f -> " - ${f}" }.join("\n")}")
}
Expand Down Expand Up @@ -674,6 +660,7 @@ task configureWar {
exclude("**/rails/logs/")
exclude("**/rails/spec/")
exclude("**/rails/tmp/")
exclude("**/rails/yarn-license-report/")

// Vendored pieces that are compiled and incorporated into `public` as necessary by Rails/Sprockets or Webpack
exclude("**/rails/node_modules/")
Expand Down
1 change: 1 addition & 0 deletions server/rails.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ task cleanRails(type: Delete) {
delete "${project.railsRoot}/tmp"
delete "${project.railsRoot}/webpack/gen"
delete "${project.railsRoot}/yarn-error.log"
delete "${project.railsRoot}/yarn-license-report"

doFirst {
// these are purposely added as `doFirst` to avoid intellij from excluding these from the modules
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* ---- WARNING ----
* Do not add any imports to this file. It is intended as pure-mixins, as comments in shared/_mixins.scss
* If you add imports here they will end up creation a lot of duplicated CSS, especially from
* fontawesome due to size and the number of places this is imported.
*/
@import "font-awesome-sprockets";
@import "bourbon/core/bourbon";

<%
variables = {}
Expand Down Expand Up @@ -44,14 +47,12 @@ $fa-font-icons: (
}
}

$fa-style-family-brands: "#{str-slice($fa-style-family, 1, -5)} Brands";

@mixin icon-only($type, $font: "font-awesome") {
@if $font == "font-awesome" {
font-family: $fa-style-family, sans-serif;
font-family: "Font Awesome 6 Free", sans-serif;
font-weight: 900;
} @else if $font == "font-awesome-brands" {
font-family: $fa-style-family-brands, sans-serif;
font-family: "Font Awesome 6 Brands", sans-serif;
font-weight: 400;
} @else {
@error "Could not find font family #{$font}";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,61 +134,10 @@
width: 10px;
}

.promote_button {
width: 15px;
height: 15px;
background-color: white;
}

.stage_approval_container {
padding-left: 15px;
}

/**
* Task editor
*/

.exec_task_editor textarea {
/* width: auto; */
}

#on_cancel_task_options {
margin-top: -32px;
margin-left: 124px;
float: left;
clear: both;
}

#on_cancel_task {
margin-top: 10px;
}

.on_cancel {
margin-top: 14px;
}

.on_cancel label {
margin-left: 5px;
}

.on_cancel input[type="text"] {
float: left;
}

#has_cancel_task {
margin: 0;
}

.on_cancel_run_if_options label.condition,
.run_if_options label.condition {
display: inline;
margin-left: 0;
}

.task_entry {
margin-top: 12px;
}

/*
* Environments
*/
Expand Down Expand Up @@ -726,21 +675,16 @@ li.template_form_error {

/* css hack to highlight selected nav item */
.general li#general a,
.project_management li#project_management a,
.materials li#materials a,
.stages li#stages a,
.environment_variables li#environment_variables a,
.parameters li#parameters a,
.permissions li#permissions a,
.stage li#stage a,
.jobs li#jobs a,
.stage_variables li#stage_variables a,
.settings li#settings a,
.tasks li#tasks a,
.artifacts li#artifacts a,
.jobs_variables li#jobs_variables a,
.tabs li#tabs a,
.jobs_permissions li#jobs_permissions a {
.artifacts li#artifacts a {
color: black;
background: #fff;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,31 @@
*
* The order in which the files are added below is the order in which they would be added in the concatenated application.css file.
*
*= require_self
*= require "structure/_reset"
*= require_tree ./css_sass
*= require "_main"
*= require "_layout"
*= require "./_structure"
*= require "structure/_application"
*= require "_module"
*= require_tree ./views
*= require '_vsm'
*/

@import "font-awesome-sprockets";
@import "shared/go-variables";
@import "shared/mixins";
@import "shared/common";

@import "structure/reset";
@import "css_sass/base/mixins";
@import "css_sass/components/messages";
@import "css_sass/components/navbar";
@import "css_sass/components/pagination";
@import "css_sass/gadgets/breadcrumb";
@import "css_sass/gadgets/button-groups";
@import "css_sass/gadgets/dropdowns";
@import "css_sass/gadgets/modals";
@import "css_sass/global/layout";
@import "css_sass/global/typography";
@import "css_sass/go-pages/admin";
@import "css_sass/go-pages/pipeline";
@import "main";
@import "layout";
@import "structure";
@import "structure/application";
@import "module";
@import "views/admin_pipelines_snippet";
@import "views/stages";
@import "vsm";
Original file line number Diff line number Diff line change
Expand Up @@ -560,58 +560,6 @@ button#signin2 span {
border-right: none;
}

/* tabs area */
#tabs li {
float: left;
list-style: none;
margin: -1px 0.2em 0 0.2em;
padding: 0;
background: #585446 image_url("bg_tabs.png") no-repeat right -80px;
_position: relative;
_top: 0;
}

#tabs li.admin {
background: #585446 image_url("bg_tabs.png") no-repeat right -160px;
margin-left: 3em;
}

#tabs li.currenttab {
background: #e7e1d1 image_url("bg_tabs.png") no-repeat right top;
position: relative;
top: 1px;
}

#tabs li a,
#tabs li a:visited,
#tabs li span {
font-size: 0.9em;
display: block;
padding: 0.7em 2em 0.7em 2em;
background: transparent image_url("bg_header_and_tabs.png") no-repeat left -280px;
color: #e7e7e7;
text-decoration: none;
}

#tabs li.admin a,
#tabs li.admin a:visited,
#tabs li.admin span {
background-position: left -360px;
}

#tabs li.currenttab a,
#tabs li.currenttab a:visited,
#tabs li.currenttab span {
margin-top: 0;
background-position: left -200px;
color: #4b220e;
font-weight: bold;
}

#tabs li a:hover {
/* text-decoration: underline; */
}

/* project-summary-panel style */
#sidebar {
width: 25em;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
.yui-ge.build_summary_page {
margin-top: 0;
}

.relative_box {
position: relative;
}

/* Define status colours across the entire site */

Expand Down

This file was deleted.

0 comments on commit c22eea2

Please sign in to comment.