Skip to content

Commit

Permalink
Framework: Migrate action types to single global file
Browse files Browse the repository at this point in the history
  • Loading branch information
aduth committed Dec 10, 2015
1 parent cbe75d5 commit d611256
Show file tree
Hide file tree
Showing 16 changed files with 24 additions and 17 deletions.
12 changes: 12 additions & 0 deletions client/state/action-types.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* Any new action type should be added to the set of exports below, with the
* value mirroring its exported name.
*
* Please keep this list alphabetized!
*/

export const FAIL_PUBLICIZE_CONNECTIONS_REQUEST = 'FAIL_PUBLICIZE_CONNECTIONS_REQUEST';
export const FETCH_PUBLICIZE_CONNECTIONS = 'FETCH_PUBLICIZE_CONNECTIONS';
export const RECEIVE_PUBLICIZE_CONNECTIONS = 'RECEIVE_PUBLICIZE_CONNECTIONS';
export const RECEIVE_SITE = 'RECEIVE_SITE';
export const SET_SELECTED_SITE = 'SET_SELECTED_SITE';
3 changes: 0 additions & 3 deletions client/state/sharing/action-types.js

This file was deleted.

2 changes: 1 addition & 1 deletion client/state/sharing/publicize/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
FETCH_PUBLICIZE_CONNECTIONS,
RECEIVE_PUBLICIZE_CONNECTIONS,
FAIL_PUBLICIZE_CONNECTIONS_REQUEST
} from '../action-types';
} from 'state/action-types';

/**
* Triggers a network request to fetch Publicize connections for the specified
Expand Down
2 changes: 1 addition & 1 deletion client/state/sharing/publicize/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
FETCH_PUBLICIZE_CONNECTIONS,
RECEIVE_PUBLICIZE_CONNECTIONS,
FAIL_PUBLICIZE_CONNECTIONS_REQUEST
} from '../action-types';
} from 'state/action-types';

/**
* Track the current status for fetching connections. Maps site ID to the
Expand Down
2 changes: 1 addition & 1 deletion client/state/sharing/publicize/test/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
FETCH_PUBLICIZE_CONNECTIONS,
RECEIVE_PUBLICIZE_CONNECTIONS,
FAIL_PUBLICIZE_CONNECTIONS_REQUEST
} from '../../action-types';
} from 'state/action-types';
import {
fetchConnections,
receiveConnections,
Expand Down
2 changes: 1 addition & 1 deletion client/state/sharing/publicize/test/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
FETCH_PUBLICIZE_CONNECTIONS,
RECEIVE_PUBLICIZE_CONNECTIONS,
FAIL_PUBLICIZE_CONNECTIONS_REQUEST
} from '../../action-types';
} from 'state/action-types';
import {
fetchingConnections,
connections,
Expand Down
1 change: 0 additions & 1 deletion client/state/sites/action-types.js

This file was deleted.

2 changes: 1 addition & 1 deletion client/state/sites/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import {
RECEIVE_SITE
} from './action-types';
} from 'state/action-types';

/**
* Returns an action object to be used in signalling that a site object has
Expand Down
2 changes: 1 addition & 1 deletion client/state/sites/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { combineReducers } from 'redux';
*/
import {
RECEIVE_SITE
} from './action-types';
} from 'state/action-types';

/**
* Tracks all known site objects, indexed by site ID.
Expand Down
2 changes: 1 addition & 1 deletion client/state/sites/test/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { expect } from 'chai';
/**
* Internal dependencies
*/
import { RECEIVE_SITE } from '../action-types';
import { RECEIVE_SITE } from 'state/action-types';
import { receiveSite } from '../actions';

describe( 'actions', () => {
Expand Down
2 changes: 1 addition & 1 deletion client/state/sites/test/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { expect } from 'chai';
/**
* Internal dependencies
*/
import { RECEIVE_SITE } from '../action-types';
import { RECEIVE_SITE } from 'state/action-types';
import { items } from '../reducer';

describe( 'reducer', () => {
Expand Down
1 change: 0 additions & 1 deletion client/state/ui/action-types.js

This file was deleted.

2 changes: 1 addition & 1 deletion client/state/ui/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import {
SET_SELECTED_SITE
} from './action-types';
} from 'state/action-types';

/**
* Returns an action object to be used in signalling that a site has been set
Expand Down
2 changes: 1 addition & 1 deletion client/state/ui/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { combineReducers } from 'redux';
*/
import {
SET_SELECTED_SITE
} from './action-types';
} from 'state/action-types';

/**
* Tracks the currently selected site ID.
Expand Down
2 changes: 1 addition & 1 deletion client/state/ui/test/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { expect } from 'chai';
/**
* Internal dependencies
*/
import { SET_SELECTED_SITE } from '../action-types';
import { SET_SELECTED_SITE } from 'state/action-types';
import { setSelectedSite } from '../actions';

describe( 'actions', () => {
Expand Down
2 changes: 1 addition & 1 deletion client/state/ui/test/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { expect } from 'chai';
/**
* Internal dependencies
*/
import { SET_SELECTED_SITE } from '../action-types';
import { SET_SELECTED_SITE } from 'state/action-types';
import { selectedSite } from '../reducer';

describe( 'reducer', () => {
Expand Down

0 comments on commit d611256

Please sign in to comment.