Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion .github/workflows/npm-grunt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential python3 gcc g++ make
sudo apt-get install -y build-essential python3 gcc g++ make php-cli php-mbstring

- name: Setup Python 3
run: |
Expand Down Expand Up @@ -80,10 +80,35 @@ jobs:
- name: Install remaining dependencies
run: npm install --legacy-peer-deps --no-audit --force

# The @testing-library packages are declared in package.json but are absent
# from package-lock.json, which is still lockfileVersion 1 and predates
# them. The install above therefore does not reliably leave them behind --
# on Node 14 / npm 6 it does not -- and `grunt checkDependencies` aborts the
# whole build over three packages no Grunt task even uses. Installing them
# last, straight from the ranges package.json declares and without writing
# to it, makes the check pass on what is actually there.
# Remove this once package-lock.json is regenerated.
- name: Install Jest testing libraries
run: |
PACKAGES=$(node -e "const d = require('./package.json').devDependencies; console.log( Object.keys( d ).filter( k => k.startsWith('@testing-library/') ).map( k => k + '@' + d[ k ] ).join(' ') )")
echo "Installing: $PACKAGES"
npm install --no-save --legacy-peer-deps --no-audit --force $PACKAGES

# `grunt makepot` shells out to WP-CLI (`wp i18n make-pot`) since the POT
# generation moved off grunt-wp-i18n. The runner does not ship WP-CLI, so
# without this the task exits 127 and takes the build down with it.
- name: Install WP-CLI
run: |
curl -sSL -o wp-cli.phar https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp
wp --info

- name: Display versions
run: |
npm -v
node -v
wp --version

- name: Run Grunt
run: grunt --verbose
83 changes: 83 additions & 0 deletions src/bb-perf-lab/assets/perf-lab.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/**
* Performance Lab -- admin screen styling.
*
* TEMPORARY diagnostic tooling. See `bb-perf-lab.php` for removal instructions.
*
* @since BuddyBoss [BBVERSION]
*/

.bb-perf-lab .bb-perf-panel {
margin-top: 1.5em;
}

.bb-perf-lab .bb-perf-status {
margin-left: 8px;
color: #646970;
}

.bb-perf-lab .bb-perf-bar {
background: #dcdcde;
border-radius: 3px;
height: 18px;
margin: 12px 0 6px;
max-width: 640px;
overflow: hidden;
}

.bb-perf-lab .bb-perf-bar span {
background: #2271b1;
display: block;
height: 100%;
transition: width 0.2s ease;
width: 0;
}

.bb-perf-lab .bb-perf-result {
margin-top: 12px;
max-width: 860px;
}

.bb-perf-lab .bb-perf-result th[scope="row"] {
width: 200px;
}

.bb-perf-lab .bb-perf-good {
color: #007017;
font-weight: 600;
}

.bb-perf-lab .bb-perf-bad {
color: #b32d2e;
font-weight: 600;
}

.bb-perf-lab .bb-perf-verdict {
background: #fff;
border-left: 4px solid #2271b1;
margin-top: 16px;
max-width: 860px;
padding: 4px 16px;
}

.bb-perf-lab .bb-perf-notes {
list-style: disc;
margin-left: 20px;
}

.bb-perf-lab .bb-perf-log code {
font-size: 11px;
word-break: break-all;
}

.bb-perf-lab .bb-perf-log tr.is-selective td:first-child {
border-left: 3px solid #007017;
}

.bb-perf-lab .bb-perf-slow pre {
background: #f6f7f7;
font-size: 11px;
max-height: 320px;
overflow: auto;
padding: 8px;
white-space: pre-wrap;
}
Loading
Loading