Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
Former-commit-id: bdb7dc0
  • Loading branch information
Leonya committed Aug 8, 2016
1 parent 15a37f8 commit 0b44c3b
Show file tree
Hide file tree
Showing 36 changed files with 96 additions and 96 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Build production files: `npm run build`

#### Custom port

Сhange the port using `npm config set ring-ui:port <port>`
Change the port using `npm config set ring-ui:port <port>`

#### Hub URL

Expand Down
12 changes: 6 additions & 6 deletions components/analytics/analytics.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,15 +220,15 @@ describe('analytics singleton', () => {
param1: 'first',
param2: 'second'
};
this.analytics.trackEntityProperties('entity', entity, ['param1', 'unexisting-property']);
this.analytics.trackEntityProperties('entity', entity, ['param1', 'nonexistent-property']);
this.clock.tick(10500);

this.send.should.have.been.calledWith([{
category: 'entity',
action: 'param1__first'
}, {
category: 'entity',
action: 'unexisting-property__no-value'
action: 'nonexistent-property__no-value'
}]);
});

Expand All @@ -242,19 +242,19 @@ describe('analytics singleton', () => {
},
param2: 'second'
};
const trackedProperies = [
const trackedProperties = [
'property.subproperty2.subsubproperty',
'propery.subproperty3.unexisting'
'property.subproperty3.nonexistent'
];
this.analytics.trackEntityProperties('entity', entity, trackedProperies);
this.analytics.trackEntityProperties('entity', entity, trackedProperties);
this.clock.tick(10500);

this.send.should.have.been.calledWith([{
category: 'entity',
action: 'property-subproperty2-subsubproperty__subsubproperty-value'
}, {
category: 'entity',
action: 'propery-subproperty3-unexisting__no-value'
action: 'property-subproperty3-unexisting__no-value'
}]);
});
});
Expand Down
6 changes: 3 additions & 3 deletions components/auth/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -673,13 +673,13 @@ Auth.prototype._loadTokenInBackground = function () {
this._requestBuilder.
prepareAuthRequest({request_credentials: 'silent'}, {nonRedirect: true}).
then(authRequest => {
let cleanRunned;
let cleanRun;

function cleanUp() {
if (cleanRunned) {
if (cleanRun) {
return;
}
cleanRunned = true;
cleanRun = true;
/* eslint-disable no-use-before-define */
clearTimeout(timeout);
removeStateListener();
Expand Down
8 changes: 4 additions & 4 deletions components/auth/auth.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ describe('Auth', () => {
});


it('should reject with redirect if 401 response recieved', () => {
it('should reject with redirect if 401 response received', () => {
const token = {access_token: 'token'};
Auth.prototype.getApi.returns(Promise.reject({
status: 401,
Expand All @@ -191,7 +191,7 @@ describe('Auth', () => {
should.be.rejectedWith(Auth.TokenValidationError, 'Problem');
});

it('should reject with redirect if invalid_grant response recieved', () => {
it('should reject with redirect if invalid_grant response received', () => {
const token = {access_token: 'token'};
Auth.prototype.getApi.returns(Promise.reject({
response: {
Expand All @@ -204,7 +204,7 @@ describe('Auth', () => {
should.be.rejectedWith(Auth.TokenValidationError, 'invalid_grant');
});

it('should reject with redirect if invalid_request response recieved', () => {
it('should reject with redirect if invalid_request response received', () => {
const token = {access_token: 'token'};
Auth.prototype.getApi.returns(Promise.reject({
response: {
Expand All @@ -217,7 +217,7 @@ describe('Auth', () => {
should.be.rejectedWith(Auth.TokenValidationError, 'invalid_request');
});

it('should reject with redirect if 401 response without json recieved', () => {
it('should reject with redirect if 401 response without json received', () => {
const token = {access_token: 'token'};
Auth.prototype.getApi.returns(Promise.reject({
status: 401,
Expand Down
4 changes: 2 additions & 2 deletions components/compiler-ng/compiler-ng.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ describe('rgCompiler', () => {
});


it('should allow use controllerAs syntaxis', () => {
it('should allow use controllerAs syntax', () => {
let compileData = null;
const text = 'Test';

Expand Down Expand Up @@ -119,7 +119,7 @@ describe('rgCompiler', () => {
});


it('should allow pass asychronous dependencies', () => {
it('should allow pass asynchronous dependencies', () => {
let compileData = null;
const text = 'Test';

Expand Down
2 changes: 1 addition & 1 deletion components/contenteditable/contenteditable.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('ContentEditable', () => {
this.component.node.innerHTML.should.equal('<b>bold</b>');
});

it('should reander only on html / disabled change', function () {
it('should render only on html / disabled change', function () {
this.component.rerender({
disabled: true
});
Expand Down
2 changes: 1 addition & 1 deletion components/dom/dom.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ describe('DOM', () => {
getRect(element).should.deep.equal({top: 14, right: 124, bottom: 124, left: 14, width: 110, height: 110});
});

it('should return DOMRect-like stub for unmounting element', () => {
it('should return DOMRect-like stub for unmounted element', () => {
const element = create();
element.setAttribute('style', style);

Expand Down
2 changes: 1 addition & 1 deletion components/header/header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
.ring-header__services.ring-header__services {
background-color: #000;

line-height: 10px; // Eliminate gap between clicable blocks rows
line-height: 10px; // Eliminate gap between clickable blocks rows
max-width: $ring-unit * 50 + 2;
padding: $ring-unit * 4 $ring-unit * 4 $ring-unit * 3;
}
Expand Down
24 changes: 12 additions & 12 deletions components/hub-source/hub-source.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('HubSource', () => {
};
});

it('Should initalize', function () {
it('Should initialize', function () {
const source = new HubSource(this.fakeAuth);
source.should.be.defined;
});
Expand Down Expand Up @@ -38,12 +38,12 @@ describe('HubSource', () => {
});
});

it('Should detect clientside threshold', function () {
it('Should detect client-side threshold', function () {
const source = new HubSource(this.fakeAuth, 'test', {searchSideThreshold: 142});
source.checkIsClientSideSearch({total: 143}).should.be.false;
});

it('Should detect serverside threshold', function () {
it('Should detect server-side threshold', function () {
const source = new HubSource(this.fakeAuth, 'test', {searchSideThreshold: 142});
source.checkIsClientSideSearch({total: 142}).should.be.true;
});
Expand All @@ -55,7 +55,7 @@ describe('HubSource', () => {
defaultFilterFn({name: 'testQuery name'}).should.be.true;
});

it('Should filter on clientside while processing results if clientside is used', function () {
it('Should filter on client-side while processing results if client-side is used', function () {
const source = new HubSource(this.fakeAuth, 'testItems');
source.isClientSideSearch = true;
source.filterFn = source.getDefaultFilterFn('testQuery');
Expand All @@ -65,7 +65,7 @@ describe('HubSource', () => {
res.should.deep.equal([{name: 'contain testQuery'}]);
});

it('Should not filter on clientside if serverside is used', function () {
it('Should not filter on client-side if server-side is used', function () {
const source = new HubSource(this.fakeAuth, 'testItems');
source.isClientSideSearch = false;
source.filterFn = source.getDefaultFilterFn('testQuery');
Expand All @@ -85,7 +85,7 @@ describe('HubSource', () => {
res.should.deep.equal([]);
});

it('Should detect clientside filtering if total is smaller than threshold', function () {
it('Should detect client-side filtering if total is smaller than threshold', function () {
this.fakeAuth.getApi = this.sinon.stub().
returns(Promise.resolve({total: 10, testItems: []}));

Expand All @@ -97,7 +97,7 @@ describe('HubSource', () => {
});
});

it('Should detect serverside filtering if total is smaller than threshold', function () {
it('Should detect server-side filtering if total is smaller than threshold', function () {
this.fakeAuth.getApi = this.sinon.stub().
returns(Promise.resolve({total: 20, testItems: []}));

Expand All @@ -109,7 +109,7 @@ describe('HubSource', () => {
});
});

it('Should do cached request and filter on clientside', function () {
it('Should do cached request and filter on client-side', function () {
const source = new HubSource(this.fakeAuth, 'testItems');
source.makeCachedRequest = this.sinon.stub().returns(Promise.resolve({
total: 20,
Expand All @@ -123,7 +123,7 @@ describe('HubSource', () => {
});
});

it('Should do not cached request to serverside', function () {
it('Should do not cached request to server-side', function () {
const source = new HubSource(this.fakeAuth, 'testItems', {searchMax: 142});
source.makeRequest = this.sinon.stub().returns(Promise.resolve({
total: 20,
Expand All @@ -150,7 +150,7 @@ describe('HubSource', () => {
source.formatQuery('foo').should.equal('foo or foo*');
});

it('Should construct multiword query', function () {
it('Should construct multi-word query', function () {
const source = new HubSource(this.fakeAuth, 'testItems');
source.formatQuery('foo bar').should.equal('foo bar or foo bar*');
});
Expand Down Expand Up @@ -182,7 +182,7 @@ describe('HubSource', () => {
source.sideDetectionRequest.should.have.been.calledWith({testParams: 'test'}, 'testQuery');
});

it('Should do clientside filtering if previously detected', function () {
it('Should do client-side filtering if previously detected', function () {
const source = new HubSource(this.fakeAuth, 'testItems');
source.doClientSideSearch = this.sinon.stub().
returns(Promise.resolve({total: 20, testItems: []}));
Expand All @@ -193,7 +193,7 @@ describe('HubSource', () => {
source.doClientSideSearch.should.have.been.calledWith({testParams: 'test'});
});

it('Should do serverside filtering if previously detected', function () {
it('Should do server-side filtering if previously detected', function () {
const source = new HubSource(this.fakeAuth, 'testItems');
source.doServerSideSearch = this.sinon.stub().
returns(Promise.resolve({total: 20, testItems: []}));
Expand Down
2 changes: 1 addition & 1 deletion components/hub-source/hub-source__users-groups.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('HubUsersGroupsSource', () => {
});
});

it('Should construct multiword query for users', function () {
it('Should construct multi-word query for users', function () {
const source = new HubSourceUsersGroups(this.fakeAuth);

const formatted = source.usersSource.options.queryFormatter('two words');
Expand Down
2 changes: 1 addition & 1 deletion components/input/input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
}
}

// Using double selector to enforce specifity, that is hard to express with &
// Using double selector to enforce specificity, that is hard to express with &
.ring-input.ring-input:disabled, .ring-input.ring-input_disabled {
@include ring-input-disabled;
}
Expand Down
12 changes: 6 additions & 6 deletions components/list/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -486,10 +486,10 @@ export default class List extends RingComponentWithShortcuts {
this.scrollEndHandler = throttle(() => {
const innerContainer = findDOMNode(this.refs.inner);
if (innerContainer) {
const maxScrollingPositon = innerContainer.scrollHeight;
const maxScrollingPosition = innerContainer.scrollHeight;
const sensitivity = Dimension.ITEM_HEIGHT / 2;
const currentScrollingPosition = innerContainer.scrollTop + innerContainer.clientHeight + sensitivity;
if (currentScrollingPosition >= maxScrollingPositon) {
if (currentScrollingPosition >= maxScrollingPosition) {
this.props.onScrollToBottom();
}
}
Expand All @@ -515,7 +515,7 @@ export default class List extends RingComponentWithShortcuts {
cachedSizes = [];

recalculateVisibleOptions(fast, ignoreFocus) {
const buffer = 10; // keep X items above and below of the visisble area
const buffer = 10; // keep X items above and below of the visible area
const innerContainer = findDOMNode(this.refs.inner);

if (this.props.renderOptimization && this.props.maxHeight) {
Expand Down Expand Up @@ -676,12 +676,12 @@ export default class List extends RingComponentWithShortcuts {
props.tabIndex = -1;
props.scrolling = this.state.scrolling;

const selectHander = event => this.selectHandler({item, event});
const selectHandler = event => this.selectHandler({item, event});

if (this.props.useMouseUp) {
props.onMouseUp = selectHander;
props.onMouseUp = selectHandler;
} else {
props.onClick = selectHander;
props.onClick = selectHandler;
}

let element;
Expand Down
2 changes: 1 addition & 1 deletion components/list/list.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ describe('List', () => {
getFirstListItem().innerHTML.should.equal('');
});

it('should render list item if type is not definded', () => {
it('should render list item if type is not defined', () => {
list.rerender({data: [
{label: 'Hello!'}
]});
Expand Down
4 changes: 2 additions & 2 deletions components/migration-to-2.3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ That will give you some nice helper features.
Also we have upgraded React itself from 0.11 to 0.14 which brings more important changes.

Key changes:
* React package was splitted into two: **React** and **ReactDOM**
* React package was split into two: **React** and **ReactDOM**
* **renderComponent** method was renamed to **render**
* Instead of **Component()** we now have to do **React.createElement(Component)**
* **setProps** was deprecated (you can use our own **rerender** method instead)
Expand Down Expand Up @@ -96,7 +96,7 @@ Normally, you SHOULD NOT use native React lifecycle methods. If you try to overr
If you're absolutely sure you need it, you can disable this check using static property **letOverrideLifecycleMethods**.

### RingComponentWithShortcuts
RingComponentWithShortcuts is an additional abstract class inherited from RingCompoent that
RingComponentWithShortcuts is an additional abstract class inherited from RingComponent that
provides four new instance methods (and a little bit of dark magic) for using keyboard shortcuts.

* getUID
Expand Down
4 changes: 2 additions & 2 deletions components/old-browsers-message/old-browsers-message.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function browserInWhiteList() {
/**
* Listens to unhandled errors and displays passed node
*/
function startOldBrowsersDectector(onOldBrowserDetected) {
function startOldBrowsersDetector(onOldBrowserDetected) {
previousWindowErrorHandler = window.onerror;

window.onerror = function oldBrowsersMessageShower(errorMsg, url, lineNumber) {
Expand All @@ -118,7 +118,7 @@ function stopOldBrowserDetector() {


//Start javascript error detection
startOldBrowsersDectector(() => {
startOldBrowsersDetector(() => {
const oldBrowsersMessageContainer = document.getElementById('ring-old-browsers-message');
const browserMessage = document.getElementById('ring-old-browsers-message__browser-message');
const errorMessage = document.getElementById('ring-old-browsers-message__error-message');
Expand Down
6 changes: 3 additions & 3 deletions components/permissions/permissions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ describe('Permissions', () => {

describe('cache with defined permissions converter', () => {
function namesConverter(key) {
const splittedKey = key.split('.');
return splittedKey[splittedKey.length - 1].toLowerCase().replace(/\_/g, '-');
const splitKey = key.split('.');
return splitKey[splitKey.length - 1].toLowerCase().replace(/\_/g, '-');
}

const permissionCacheWithConverter = new PermissionCache([
Expand All @@ -197,7 +197,7 @@ describe('Permissions', () => {
createPermission('jetbrains.upsource.permission.project.admin', null, true)
], namesConverter);

it('should not permit unexisting permission', () => {
it('should not permit nonexistent permission', () => {
permissionCacheWithConverter.has('work-item-update').should.be.false;
permissionCacheWithConverter.has('JetBrains.YouTrack.UPDATE_WORK_ITEM').should.be.false;
});
Expand Down
2 changes: 1 addition & 1 deletion components/permissions/permissions__cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ export default class PermissionCache {
const t = lexems.shift();
let result;

// Nested paranthesized expression
// Nested parenthesized expression
if (t === '(') {
result = this.or(lexems, projectId);
// Expect ')'
Expand Down
Loading

0 comments on commit 0b44c3b

Please sign in to comment.