Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Travis, 4.0 API fixes #216

Merged
merged 10 commits into from
Oct 9, 2017
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.sass-cache
/.php_cs.cache
/node_modules/
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,17 @@
"silverstripe/cms": "The SilverStripe Content Management System"
},
"require-dev": {
"phpunit/PHPUnit": "~4.8"
"phpunit/PHPUnit": "^5.7"
},
"extra": {
"branch-alias": {
"dev-master": "3.x-dev"
}
},
"scripts": {
"lint": "phpcs src/ tests/",
"fix": "php-cs-fixer fix src/ && php-cs-fixer fix tests/"
},
"autoload": {
"psr-4": {
"SilverStripe\\Comments\\": "src/",
Expand Down
24 changes: 0 additions & 24 deletions config.rb

This file was deleted.

238 changes: 74 additions & 164 deletions css/comments.css
Original file line number Diff line number Diff line change
@@ -1,166 +1,76 @@
.comments-holder-container {
clear: both;
}
.comments-holder-container .field {
clear: left;
}
.comments-holder-container .num,
.comments-holder-container .author {
font-size: 1.3em;
}
.comments-holder-container .num {
color: #999;
margin-right: 5px;
}
.comments-holder-container .num-total {
line-height: 40px;
margin-bottom: 0;
}
.comments-holder-container #moderated {
border: solid #999 1px;
padding: 20px;
font-style: italic;
}
.comments-holder-container .comments-list {
margin: 0;
}
.comments-holder-container .comment-count {
margin: 15px 0;
}
.comments-holder-container .commenting-area {
margin-top: 50px;
}
.comments-holder-container .commenting-area label.left {
font-weight: normal;
}
.comments-holder-container .commenting-rss-feed {
margin-top: 4em;
text-align: right;
}
.comments-holder-container .commenting-rss-feed .action-links {
margin: 20px 0 10px;
}
.comments-holder-container .commenting-rss-feed .action-links li {
display: inline;
list-style-type: none;
margin-left: 20px;
}
.comments-holder-container .commenting-rss-feed .action-links li:first-child {
margin-left: 0;
}
.comments-holder-container .commenting-rss-feed .action-links li.comment-reply-action {
float: right;
}
.comments-holder-container .commenting-rss-feed .action-links a {
background-image: none;
}
.comments-holder-container .commenting-rss-feed .action-links a::first-letter {
text-transform: capitalize;
}
.comments-holder-container .no-comments-yet {
display: inline-block;
margin-top: 10px;
}
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // identity function for calling harmony imports with the correct context
/******/ __webpack_require__.i = function(value) { return value; };
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ }
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports) {

.comment {
clear: both;
list-style-type: none;
overflow: hidden;
padding: 20px 0 20px 0;
position: relative;
}
.comment.author-comment:after {
content: 'Author';
float: right;
position: absolute;
top: 1.5em;
right: 0.5em;
font-size: 1em;
font-weight: bold;
}
.comment.author-comment > .comment-text {
border: 1px solid blue;
}
.comment.spam .comment-text {
border: 1px dashed orange;
}
.comment img.gravatar {
float: left;
margin: 20px;
width: 90px;
height: 90px;
border: none;
}
.comment .comment-text {
background-color: #fff;
border: 1px solid #ddd;
box-shadow: none;
margin: 0;
padding: 0 20px 0 20px;
min-height: 130px;
white-space: pre;
white-space: pre-wrap;
white-space: pre-line;
word-wrap: break-word;
}
.comment .comment-text p:last-child {
margin-bottom: 0;
}
.comment .comment-text.hasGravatar {
padding: 0 20px 0 130px;
min-height: 130px;
}
.comment .date {
font-size: 16px;
}
.comment .date:before {
content: '\0000a0\0000a0\0000a0\0000a0';
}
.comment.unmoderated > .comment-text {
border: 1px solid yellow;
}
.comment .info {
margin-bottom: 10px;
}
.comment.spam .comment {
border: 1px dashed orange;
border-radius: 4px;
padding: 2.5em 1em 1em;
}
.comment .comment-replies-container {
clear: both;
padding-left: 10px;
margin: 80px 0 0 0;
border-left: 1px dashed #999;
}
.comment .comment-replies-container .comment-reply-form-holder {
padding: 0 10px;
}
.comment .comment-replies-container .comment-replies-holder {
padding: 0 0 0 10px;
}
// removed by extract-text-webpack-plugin

.comments-list.root-level {
margin-left: 0;
}

.comment-reply-link {
float: right;
}

.comment-moderation-options {
float: left;
}

.comment-action-links {
margin: 20px 0 10px;
}
.comment-action-links a:not(:last-child) {
margin-right: 12px;
}

.commenting-rss-feed ul {
list-style: none;
}

/*# sourceMappingURL=comments.css.map */
/***/ })
/******/ ]);
1 change: 1 addition & 0 deletions css/styles/bundle.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

63 changes: 63 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"name": "silverstripe-comments",
"version": "1.0.0",
"description": "SilverStripe campaign admin interface",
"directories": {
"test": "tests"
},
"engines": {
"node": "^6.x"
},
"scripts": {
"build": "yarn && NODE_ENV=production webpack -p --bail --progress",
"watch": "yarn && NODE_ENV=development webpack --watch --progress",
"css": "yarn && WEBPACK_CHILD=css webpack -p --bail --progress",
"test": "jest",
"coverage": "jest --coverage",
"lint": "eslint client/src && sass-lint -v client/src"
},
"repository": {
"type": "git",
"url": "git://github.com/silverstripe/silverstripe-comments.git"
},
"keywords": [
"silverstripe",
"admin"
],
"author": "SilverStripe Ltd",
"license": "BSD-3-Clause",
"bugs": {
"url": "https://github.com/silverstripe/silverstripe-comments/issues"
},
"homepage": "https://github.com/silverstripe/silverstripe-comments",
"dependencies": {

},
"devDependencies": {
"@silverstripe/webpack-config": "^0.2.7",
"babel-core": "^6.7.4",
"babel-jest": "^19.0.0",
"babel-preset-es2015": "^6.6.0",
"babel-preset-es2016": "^6.24.1",
"babel-preset-react": "^6.5.0",
"eslint": "^2.5.3",
"eslint-config-airbnb": "^6.2.0",
"eslint-plugin-react": "^4.2.3",
"jest-cli": "^19.0.2",
"react-addons-test-utils": "^15.3.1",
"redux-logger": "^2.6.1",
"redux-mock-store": "^1.2.3",
"redux-thunk": "^2.2.0",
"sass-lint": "^1.10.2"
},
"babel": {
"presets": [
"react",
"es2015",
"es2016"
],
"plugins": [
"transform-object-rest-spread"
]
}
}
22 changes: 22 additions & 0 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="SilverStripe">
<description>CodeSniffer ruleset for SilverStripe coding conventions.</description>

<!-- base rules are PSR-2 -->
<rule ref="PSR2" >
<!-- Current exclusions -->
<exclude name="PSR1.Methods.CamelCapsMethodName" />
<exclude name="PSR1.Files.SideEffects.FoundWithSymbols" />
<exclude name="PSR2.Classes.PropertyDeclaration" />
<exclude name="PSR2.ControlStructures.SwitchDeclaration" /> <!-- causes php notice while linting -->
<exclude name="PSR2.ControlStructures.SwitchDeclaration.WrongOpenercase" />
<exclude name="PSR2.ControlStructures.SwitchDeclaration.WrongOpenerdefault" />
<exclude name="PSR2.ControlStructures.SwitchDeclaration.TerminatingComment" />
<exclude name="PSR2.Methods.MethodDeclaration.Underscore" />
<exclude name="Squiz.Scope.MethodScope" />
<exclude name="Squiz.Classes.ValidClassName.NotCamelCaps" />
<exclude name="Generic.Files.LineLength.TooLong" />
<exclude name="PEAR.Functions.ValidDefaultValue.NotAtEnd" />
</rule>

</ruleset>
14 changes: 14 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<phpunit bootstrap="cms/tests/bootstrap.php" colors="true">
<testsuite name="Default">
<directory>tests</directory>
</testsuite>

<filter>
<whitelist addUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src/</directory>
<exclude>
<directory suffix=".php">tests/</directory>
</exclude>
</whitelist>
</filter>
</phpunit>
Loading