From 9ac840f853b82551da08e6fd34a1895e386fefcb Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 8 Jan 2017 14:14:55 +0100 Subject: [PATCH 01/12] [ticket/14970] Add package.json for phpBB PHPBB3-14970 --- phpBB/package.json | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 phpBB/package.json diff --git a/phpBB/package.json b/phpBB/package.json new file mode 100644 index 0000000000..a7514e39fc --- /dev/null +++ b/phpBB/package.json @@ -0,0 +1,32 @@ +{ + "name": "phpbb", + "version": "3.3.0-dev", + "description": "phpBB Forum Software application", + "main": " ", + "directories": { + "doc": "docs" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/phpbb/phpbb.git" + }, + "keywords": [ + "phpBB", + "phpbb", + "forum", + "php", + "software", + "community" + ], + "author": "", + "license": "GPL-2.0", + "bugs": { + "url": "https://github.com/phpbb/phpbb/issues" + }, + "homepage": "https://github.com/phpbb/phpbb#readme", + "devDependencies": { + } +} From c8dcf82b3ee6ede4dcc4a68d02765b308f40f539 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 8 Jan 2017 14:15:38 +0100 Subject: [PATCH 02/12] [ticket/14970] Ignore node_modules directory PHPBB3-14970 --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index ac29bb403c..feb702cb86 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ /phpBB/styles/* !/phpBB/styles/prosilver !/phpBB/styles/all +/phpBB/node_modules /phpBB/vendor /tests/phpbb_unit_tests.sqlite* /tests/test_config*.php From 67bc5f93ce780d069c9d85e9de0d579a23773e72 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 8 Jan 2017 14:28:47 +0100 Subject: [PATCH 03/12] [ticket/14970] Add stylelint to package.json PHPBB3-14970 --- phpBB/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/phpBB/package.json b/phpBB/package.json index a7514e39fc..18f095b456 100644 --- a/phpBB/package.json +++ b/phpBB/package.json @@ -28,5 +28,6 @@ }, "homepage": "https://github.com/phpbb/phpbb#readme", "devDependencies": { + "stylelint": "^7.7.1" } } From 47caa97ff2ddf9500c8d37a64179022044ec30ec Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 8 Jan 2017 14:29:05 +0100 Subject: [PATCH 04/12] [ticket/14970] Fixed issues picked up by stylelint PHPBB3-14970 --- phpBB/styles/prosilver/theme/common.css | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css index c4eead7027..009d31ecab 100644 --- a/phpBB/styles/prosilver/theme/common.css +++ b/phpBB/styles/prosilver/theme/common.css @@ -93,9 +93,9 @@ p.right { } p.jumpbox-return { + float: left; margin-top: 10px; margin-bottom: 0; - float: left; } b, @@ -1128,10 +1128,10 @@ ul.linklist:after, } .emoji { - min-height: 18px; + width: 1em; min-width: 18px; height: 1em; - width: 1em; + min-height: 18px; } .smilies { @@ -1299,18 +1299,17 @@ ul.linklist:after, } .badge { - border-radius: 10px; - opacity: 0.8; - text-align: center; - white-space: nowrap; font-size: 10px; line-height: 1; - float: right; - display: inline-block; - margin-left: 3px; - vertical-align: baseline; + text-align: center; + white-space: nowrap; + border-radius: 10px; + opacity: 0.8; position: relative; top: 3px; + display: inline-block; + float: right; + margin-left: 3px; padding: 4px 6px; } From 1be84e0233266e9be70085196208dd8a464910d2 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 8 Jan 2017 14:36:30 +0100 Subject: [PATCH 05/12] [ticket/14970] Run stylelint on travis PHPBB3-14970 --- .travis.yml | 6 ++++++ travis/check-stylesheet.sh | 24 ++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100755 travis/check-stylesheet.sh diff --git a/.travis.yml b/.travis.yml index 19251d6155..b48927b4ea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,6 +31,11 @@ matrix: - php: nightly fast_finish: true +addons: + apt: + sources: + - node + services: - redis-server @@ -46,6 +51,7 @@ script: - travis/check-sami-parse-errors.sh $DB $TRAVIS_PHP_VERSION $NOTESTS - travis/check-image-icc-profiles.sh $DB $TRAVIS_PHP_VERSION $NOTESTS - travis/check-executable-files.sh $DB $TRAVIS_PHP_VERSION $NOTESTS ./ + - travis/check-stylesheet.sh $DB $TRAVIS_PHP_VERSION $NOTESTS - sh -c "if [ '$SLOWTESTS' != '1' -a '$DB' = 'mysqli' ]; then phpBB/vendor/bin/phpunit tests/lint_test.php; fi" - sh -c "if [ '$NOTESTS' != '1' -a '$SLOWTESTS' != '1' ]; then phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml; fi" - sh -c "if [ '$SLOWTESTS' = '1' ]; then phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml --group slow; fi" diff --git a/travis/check-stylesheet.sh b/travis/check-stylesheet.sh new file mode 100755 index 0000000000..aa1b4d7a6d --- /dev/null +++ b/travis/check-stylesheet.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# +# This file is part of the phpBB Forum Software package. +# +# @copyright (c) phpBB Limited +# @license GNU General Public License, version 2 (GPL-2.0) +# +# For full copyright and license information, please see +# the docs/CREDITS.txt file. +# +set -e +set -x + +DB=$1 +TRAVIS_PHP_VERSION=$2 +NOTESTS=$3 + +if [ "$NOTESTS" == '1' ] +then + cd phpBB + npm install -g + npm install + stylelint --config ../.stylelintrc "styles/prosilver/theme/*.css" +fi From f872020c1ad14063c7ba71c4ec152d16170060a6 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 8 Jan 2017 14:47:58 +0100 Subject: [PATCH 06/12] [ticket/14970] Try using newer node version PHPBB3-14970 --- travis/check-stylesheet.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/travis/check-stylesheet.sh b/travis/check-stylesheet.sh index aa1b4d7a6d..dfcf7332f2 100755 --- a/travis/check-stylesheet.sh +++ b/travis/check-stylesheet.sh @@ -18,6 +18,20 @@ NOTESTS=$3 if [ "$NOTESTS" == '1' ] then cd phpBB + # Define a node version. + TRAVIS_NODE_VERSION="4" + + # Clear out whatever version of NVM Travis has. + # Their version of NVM is probably old. + rm -rf ~/.nvm + # Grab NVM. + git clone https://github.com/creationix/nvm.git ~/.nvm + # Checkout the latest stable tag. + # Note that you can just hardcode a preferred version here. + (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) + # Install the desired version of Node + source ~/.nvm/nvm.sh + nvm install $TRAVIS_NODE_VERSION npm install -g npm install stylelint --config ../.stylelintrc "styles/prosilver/theme/*.css" From 6a8f20a788cc7b6a566feefde74e90d8f3696b84 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 9 Jan 2017 22:35:01 +0100 Subject: [PATCH 07/12] [ticket/14970] Do not output node install output in stylelint PHPBB3-14970 --- travis/check-stylesheet.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/travis/check-stylesheet.sh b/travis/check-stylesheet.sh index dfcf7332f2..e8d35da116 100755 --- a/travis/check-stylesheet.sh +++ b/travis/check-stylesheet.sh @@ -9,7 +9,7 @@ # the docs/CREDITS.txt file. # set -e -set -x +set +x DB=$1 TRAVIS_PHP_VERSION=$2 @@ -25,14 +25,15 @@ then # Their version of NVM is probably old. rm -rf ~/.nvm # Grab NVM. - git clone https://github.com/creationix/nvm.git ~/.nvm + git clone https://github.com/creationix/nvm.git ~/.nvm > /dev/null # Checkout the latest stable tag. # Note that you can just hardcode a preferred version here. (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) # Install the desired version of Node source ~/.nvm/nvm.sh - nvm install $TRAVIS_NODE_VERSION - npm install -g - npm install + nvm install $TRAVIS_NODE_VERSION > /dev/null + npm install -g > /dev/null + npm install > /dev/null + set -x stylelint --config ../.stylelintrc "styles/prosilver/theme/*.css" fi From dcf83ce60bc78d00f3c6cb4e9d7d1a3d72ad807c Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Wed, 22 Feb 2017 21:41:17 +0100 Subject: [PATCH 08/12] [ticket/14970] Update package.json definitions for bugs & homepage PHPBB3-14970 --- phpBB/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/package.json b/phpBB/package.json index 18f095b456..47372724dd 100644 --- a/phpBB/package.json +++ b/phpBB/package.json @@ -24,9 +24,9 @@ "author": "", "license": "GPL-2.0", "bugs": { - "url": "https://github.com/phpbb/phpbb/issues" + "url": "https://tracker.phpbb.com" }, - "homepage": "https://github.com/phpbb/phpbb#readme", + "homepage": "https://www.phpbb.com", "devDependencies": { "stylelint": "^7.7.1" } From ccd4aed3c82e5c5a70ec68873f5f7c96c46f026f Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Wed, 22 Feb 2017 21:41:56 +0100 Subject: [PATCH 09/12] [ticket/14970] Add stylelint-order as dependency PHPBB3-14970 --- phpBB/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/phpBB/package.json b/phpBB/package.json index 47372724dd..fc85b20a99 100644 --- a/phpBB/package.json +++ b/phpBB/package.json @@ -28,6 +28,7 @@ }, "homepage": "https://www.phpbb.com", "devDependencies": { - "stylelint": "^7.7.1" + "stylelint": "^7.7.1", + "stylelint-order": "^0.3.0" } } From fa2d1eb8b16afd993b46cf16488a94d247c5402d Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Wed, 22 Feb 2017 21:43:19 +0100 Subject: [PATCH 10/12] [ticket/14970] Remove unneeded parameters from check-stylesheet.sh PHPBB3-14970 --- .travis.yml | 2 +- travis/check-stylesheet.sh | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index b48927b4ea..bdcc354641 100644 --- a/.travis.yml +++ b/.travis.yml @@ -51,7 +51,7 @@ script: - travis/check-sami-parse-errors.sh $DB $TRAVIS_PHP_VERSION $NOTESTS - travis/check-image-icc-profiles.sh $DB $TRAVIS_PHP_VERSION $NOTESTS - travis/check-executable-files.sh $DB $TRAVIS_PHP_VERSION $NOTESTS ./ - - travis/check-stylesheet.sh $DB $TRAVIS_PHP_VERSION $NOTESTS + - travis/check-stylesheet.sh $NOTESTS - sh -c "if [ '$SLOWTESTS' != '1' -a '$DB' = 'mysqli' ]; then phpBB/vendor/bin/phpunit tests/lint_test.php; fi" - sh -c "if [ '$NOTESTS' != '1' -a '$SLOWTESTS' != '1' ]; then phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml; fi" - sh -c "if [ '$SLOWTESTS' = '1' ]; then phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml --group slow; fi" diff --git a/travis/check-stylesheet.sh b/travis/check-stylesheet.sh index e8d35da116..ce5ad87f79 100755 --- a/travis/check-stylesheet.sh +++ b/travis/check-stylesheet.sh @@ -11,9 +11,7 @@ set -e set +x -DB=$1 -TRAVIS_PHP_VERSION=$2 -NOTESTS=$3 +NOTESTS=$1 if [ "$NOTESTS" == '1' ] then From 54d60dc8b1e9e12ec9c178968d6135ff83a95e1f Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Thu, 23 Feb 2017 22:27:42 +0100 Subject: [PATCH 11/12] [ticket/14970] Fix issues noted by stylelint PHPBB3-14970 --- phpBB/styles/prosilver/theme/content.css | 4 ++-- phpBB/styles/prosilver/theme/responsive.css | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/phpBB/styles/prosilver/theme/content.css b/phpBB/styles/prosilver/theme/content.css index a07876917d..88376d3430 100644 --- a/phpBB/styles/prosilver/theme/content.css +++ b/phpBB/styles/prosilver/theme/content.css @@ -515,11 +515,11 @@ blockquote cite > div { /* Code block */ .codebox { font-size: 1em; + word-wrap: normal; border: 1px solid transparent; + overflow-x: scroll; margin: 1em 0 1.2em; padding: 3px; - overflow-x: scroll; - word-wrap: normal; } .codebox p { diff --git a/phpBB/styles/prosilver/theme/responsive.css b/phpBB/styles/prosilver/theme/responsive.css index ef4b398dd6..bc606e9723 100644 --- a/phpBB/styles/prosilver/theme/responsive.css +++ b/phpBB/styles/prosilver/theme/responsive.css @@ -623,7 +623,6 @@ } @media (min-width: 701px) and (max-width: 950px) { - ul.topiclist dt { margin-right: -410px; } From 0097a575ecadddb07e6f47775a62c5ac8219f2cb Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Tue, 7 Mar 2017 21:14:28 +0100 Subject: [PATCH 12/12] [ticket/14970] Also run stylelint against admin css PHPBB3-14970 --- travis/check-stylesheet.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/travis/check-stylesheet.sh b/travis/check-stylesheet.sh index ce5ad87f79..a834833399 100755 --- a/travis/check-stylesheet.sh +++ b/travis/check-stylesheet.sh @@ -34,4 +34,6 @@ then npm install > /dev/null set -x stylelint --config ../.stylelintrc "styles/prosilver/theme/*.css" + # Disable admin stylelint for now + # stylelint --config ../.stylelintrc "adm/style/*.css" fi