Skip to content

Commit

Permalink
Merge branch 'master' into update/site-settings-jetpack
Browse files Browse the repository at this point in the history
  • Loading branch information
alternatekev committed Dec 11, 2015
2 parents 217525b + 3e8fa7f commit 0d5a46f
Show file tree
Hide file tree
Showing 156 changed files with 2,639 additions and 964 deletions.
4 changes: 2 additions & 2 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,7 @@ Permission kindly granted by Ben Congleton, of Olark.
```

### https://github.com/rackt/redux/
#### shared/lib/create-redux-store
#### client/state
```text
The MIT License (MIT)
Expand All @@ -1188,7 +1188,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
```

### https://github.com/gaearon/redux-thunk
#### shared/lib/create-redux-store
#### client/state
```text
The MIT License (MIT)
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ node_modules: package.json
test: build
@$(BIN)/run-all-tests

lint: node_modules/eslint node_modules/eslint-plugin-react node_modules/babel-eslint
lint: node_modules/eslint node_modules/eslint-plugin-react node_modules/babel-eslint mixedindentlint
@$(NODE_BIN)/eslint --quiet $(JS_FILES)

eslint: lint
Expand All @@ -85,6 +85,10 @@ eslint-branch: node_modules/eslint node_modules/eslint-plugin-react node_modules
i18n-lint:
@echo "$(JS_FILES)" | sed 's/\([^ ]*\/test\/[^ ]* *\)//g' | xargs -n1 $(I18NLINT)

# Skip files that are auto-generated
mixedindentlint: node_modules/mixedindentlint
@echo "$(JS_FILES)\n$(SASS_FILES)" | xargs $(NODE_BIN)/mixedindentlint --ignore-comments --exclude="client/config/index.js" --exclude="shared/components/gridicon/index.jsx"

# keep track of the current CALYPSO_ENV so that it can be used as a
# prerequisite for other rules
.env: FORCE
Expand Down
14 changes: 7 additions & 7 deletions assets/stylesheets/sections/_domain-search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ form.google-apps-dialog {
}

.google-apps-dialog__user-fields {
animation: google-apps-user-show 0.3s ease-in-out;
animation: google-apps-user-show 0.3s ease-in-out;
margin-bottom: 20px;
}

Expand Down Expand Up @@ -226,13 +226,13 @@ form.google-apps-dialog {
}

@keyframes "google-apps-user-show" {
0% {
max-height: 0px;
}
0% {
max-height: 0px;
}

100% {
max-height: 150px;
}
100% {
max-height: 150px;
}
}

.google-apps-dialog__footer {
Expand Down
4 changes: 2 additions & 2 deletions assets/stylesheets/sections/_menus.scss
Original file line number Diff line number Diff line change
Expand Up @@ -839,10 +839,10 @@
.search-container {
position: relative;

.noticon-search {
.gridicon {
position: absolute;
left: 0;
padding: 9px 9px;
padding: 9px 8px;
}

.search-box {
Expand Down
4 changes: 2 additions & 2 deletions assets/stylesheets/sections/_posts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -332,11 +332,11 @@

/* RTL */
.rtl .posts__list {
//smaller font, let's use Tahoma
//smaller font, let's use Tahoma
.post__quote {
font-family: $sans-rtl;
}
//we can use the default sans for titles
//we can use the default sans for titles
.post__title {
font-family: $sans;
}
Expand Down
24 changes: 12 additions & 12 deletions assets/stylesheets/sections/_stats.scss
Original file line number Diff line number Diff line change
Expand Up @@ -691,18 +691,18 @@ ul.module-tabs {
}
}

&.is-enabled {
background: $gray-light;
&.is-enabled {
background: $gray-light;

&,
li {
&,
li {
border-color: $gray-light;
}
}

a {
background: $gray-light;
}
}
a {
background: $gray-light;
}
}
}

// Module Content
Expand Down Expand Up @@ -928,9 +928,9 @@ ul.module-tabs {
from {
opacity: 1;
}
to {
opacity: 0;
}
to {
opacity: 0;
}
}

.stats-poll__message {
Expand Down
92 changes: 46 additions & 46 deletions assets/stylesheets/sections/_translator.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,64 +38,64 @@
}
}

&.active {
background: $white;
a {
color: $blue-wordpress;
&.active {
background: $white;
a {
color: $blue-wordpress;
}
}
}
}

//Overwriting the popup defaults
body {
.webui-popover {
border-radius: 2px;
padding: 0;
text-align: inherit;
border-color: lighten( $gray, 20% );
z-index: 100300; // Appear above dialog
.webui-popover {
border-radius: 2px;
padding: 0;
text-align: inherit;
border-color: lighten( $gray, 20% );
z-index: 100300; // Appear above dialog

.webui-popover-title {
background-color: lighten( $gray, 20% );
border-color: lighten( $gray, 30% );
border-radius: 1px 1px 0 0;
}
.webui-popover-title {
background-color: lighten( $gray, 20% );
border-color: lighten( $gray, 30% );
border-radius: 1px 1px 0 0;
}

&.top,
&.top-right,
&.top-left {
.arrow {
border-top-color: lighten( $gray, 20% );
}
}
&.top,
&.top-right,
&.top-left {
.arrow {
border-top-color: lighten( $gray, 20% );
}
}

&.right,
&.right-top,
&.right-bottom {
.arrow {
border-right-color: lighten( $gray, 20% );
}
}
&.right,
&.right-top,
&.right-bottom {
.arrow {
border-right-color: lighten( $gray, 20% );
}
}

&.left,
&.left-top,
&.left-bottom {
.arrow {
border-left-color: lighten( $gray, 20% );
}
}
&.left,
&.left-top,
&.left-bottom {
.arrow {
border-left-color: lighten( $gray, 20% );
}
}

&.bottom,
&.bottom-right,
&.bottom-left {
.arrow {
border-bottom-color: lighten( $gray, 20% );
&:after {
border-bottom-color: lighten( $gray, 20% );
&.bottom,
&.bottom-right,
&.bottom-left {
.arrow {
border-bottom-color: lighten( $gray, 20% );
&:after {
border-bottom-color: lighten( $gray, 20% );
}
}
}
}
}
}
}

.translator-modal {
Expand Down
8 changes: 4 additions & 4 deletions assets/stylesheets/shared/_extends.scss
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@

%mobile-link-element {
-webkit-tap-highlight-color: rgba($white, .4); // Until we capture ontouch events in JS this is better than :active
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}

%mobile-interface-element {
Expand Down
2 changes: 1 addition & 1 deletion assets/stylesheets/shared/_livechat.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1004,5 +1004,5 @@ div.hbl_pal_main_width {
}

.olrk-state-compressed div.hbl_pal_main_width {
width: 28px !important;
width: 28px !important;
}
52 changes: 52 additions & 0 deletions bin/gridiconFormatChecker
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#!/usr/bin/env node

var fs = require( 'fs' );
var validIconSizes = [ 12, 18, 24, 36, 48, 54, 72 ];

var filename = process.argv[ 2 ];

fs.readFile( filename, 'utf8', function ( err, data ) {
var result = '',
splittedCode,
lineNumber = 1;
if ( err ) {
console.log(err);
process.exit( 1 );
}
data = data.toLowerCase();
splittedCode = data.split( '<gridicon' );

if ( splittedCode.length > 1 ) {
// There are gridicon instances in this file.
splittedCode.forEach( function( chunk ) {
var gridiconAttrs, isNonStandard, size;
if( chunk ) {
// we discard all the code after the tag closing... we are only interested in the props of the gridicon.
gridiconAttrs = chunk.split( '>' )[ 0 ];
isNonStandard = gridiconAttrs.indexOf( 'nonstandardsize' ) >= 0;
if ( gridiconAttrs.indexOf( 'size={' ) >= 0 ) {
size = gridiconAttrs.split( 'size={' )[ 1 ].split( '}' )[ 0 ];
if ( !isNaN( size ) ) {
// We only can check if the size is standard if it is a number. If not (variables), we have no way of knowing if it's fine or not
if( !isNonStandard && validIconSizes.indexOf( +size ) < 0 ) {
result += '\033[31mNon-standard gridicon size ( ' + size + 'px ) detected in ' + filename + ' line ' + lineNumber + '\n';
}
if( isNonStandard && validIconSizes.indexOf( +size ) >= 0 ) {
result += '\033[33mStandard size gridicon ( ' + size + 'px ) marked as non-standard... are you sure that is ok? in ' + filename + ' line ' + lineNumber + '\n';
}
}
}
lineNumber += chunk.split('\n').length - 1;
}
} );
}

if ( result !== '' ) {
console.error( result );
console.log( '\033[mValid gridiconsizes are ' + validIconSizes.join( 'px, ' ) + 'px' );
console.log( '\033[mIf you need any of those Gridicons to have a non-standard size, please, add \'nonStandardSize\' as a property. See https://github.com/Automattic/wp-calypso/tree/master/shared/components/gridicon#props \n' );
process.exit( 1 );
} else {
process.exit( 0 );
}
} );
9 changes: 9 additions & 0 deletions bin/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ done

echo "\neslint validation complete\n"

for file in ${files}; do
./bin/gridiconFormatChecker ${file}
if [ $? -ne 0 ]; then
echo "\033[31mGridicon Format Check Failed: \033[0m${file}\n"
pass=false
fi
done


if ! $pass; then
echo "\033[41mCOMMIT FAILED:\033[0m Your commit contains files that should pass validation tests but do not. Please fix the errors and try again.\n"
exit 1
Expand Down
9 changes: 7 additions & 2 deletions client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,21 @@ These are some of the key modules of the application, kept in `client`'s root fo

The `/components` folder holds all the internal React components used to build the Calypso UI across sections. Most of these are rendered in `/devdocs/design` for reference.

### State

The `/state` folder holds the structure of the application global state and data flows.

### Lib

The `/lib` folder holds internal modules and utilities that power Calypso.

### Core Sections

These represent the top section in the masterbar and handle the controllers for the entire app. Most React components live within their specific section.
These represent the top section in the masterbar as well as other significant areas of the app. Within these all the controllers for the entire app are expressed. Most React app-components live within their specific section and not in `client/components`.

* `my-sites`: the site related admin functionality. Akin to wp-admin.
* `reader`: the home of all Reader sections.
* `notifications`: the notifications panel.
* `me`: the sections under the `/me` route.

* `post-editor`: the editor.
* `signup`: the signup flows.
2 changes: 1 addition & 1 deletion client/auth/login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const LostPassword = React.createClass( {
{ this.translate( 'Lost your password?' ) }
</a>
</p>
);
);
}
} );

Expand Down
4 changes: 2 additions & 2 deletions client/auth/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ html.is-desktop {
padding: 0;
}

.notice.is-info:before {
content: none;
.notice.is-info .notice__icon {
display: none;
}
}

Expand Down
4 changes: 2 additions & 2 deletions client/boot/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ var config = require( 'config' ),
touchDetect = require( 'lib/touch-detect' ),
accessibleFocus = require( 'lib/accessible-focus' ),
TitleStore = require( 'lib/screen-title/store' ),
createReduxStore = require( 'lib/create-redux-store' ),
createReduxStore = require( 'state' ).createReduxStore,
// The following mixins require i18n content, so must be required after i18n is initialized
Layout,
LoggedOutLayout;
Expand Down Expand Up @@ -87,7 +87,7 @@ function setUpContext( layout ) {
var parsed = url.parse( location.href, true );

context.layout = layout;
context.reduxStore = reduxStore;
context.store = reduxStore;

// Break routing and do full page load for logout link in /me
if ( context.pathname === '/wp-login.php' ) {
Expand Down
Loading

0 comments on commit 0d5a46f

Please sign in to comment.