Skip to content

Commit

Permalink
code refactoring for readability (#162)
Browse files Browse the repository at this point in the history
* code refactor for readability

* Optimization about preference window

- Delete action and store of preference
  - because It don't need to manage globally.
  - unnecessary action can cause confuse.

* Optimization about search window

* [WIP] Optimize of managing widget window

* Fix unit test code

* Delete update logic

- current update logic automatically update
- manually update doesn't need any more
  • Loading branch information
HyunmoAhn authored Mar 30, 2019
1 parent 20ab46a commit 2951f81
Show file tree
Hide file tree
Showing 132 changed files with 924 additions and 4,697 deletions.
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"react/jsx-one-expression-per-line": 0,
"lines-between-class-members": 0,
"no-continue": 0,
"no-bitwise": 0
"no-bitwise": 0,
"react/destructuring-assignment": 0
},
"parser": "babel-eslint",
"globals": {
Expand Down
50 changes: 0 additions & 50 deletions app/actions/__tests__/preference.spec.js

This file was deleted.

36 changes: 0 additions & 36 deletions app/actions/__tests__/search.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,40 +65,4 @@ describe('test search actions', () => {

expect(actions.searchWidgetSelectIncrease()).toEqual(mockAction);
});

it('should handle searchWindowHide', () => {
const mockAction = {
type: TYPES.SEARCH_WINDOW_HIDE,
payload: {},
meta: {
category: CATEGORY.TARGET,
containMain: true,
self: false,
},
};

expect(actions.searchWindowHide()).toEqual(mockAction);
});

it('should handle searchTrayOpen', () => {
const mockAction = {
type: TYPES.SEARCH_TRAY_OPEN,
meta: {
category: CATEGORY.BROADCAST,
},
};

expect(actions.searchTrayOpen()).toEqual(mockAction);
});

it('should handle searchTrayClose', () => {
const mockAction = {
type: TYPES.SEARCH_TRAY_CLOSE,
meta: {
category: CATEGORY.BROADCAST,
},
};

expect(actions.searchTrayClose()).toEqual(mockAction);
});
});
226 changes: 0 additions & 226 deletions app/actions/__tests__/update.spec.js

This file was deleted.

26 changes: 0 additions & 26 deletions app/actions/__tests__/window.spec.js

This file was deleted.

7 changes: 0 additions & 7 deletions app/actions/constant/actionTypes.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
export const MODAL_OPEN = 'MODAL_OPEN';
export const MODAL_CLOSE = 'MODAL_CLOSE';
export const OPEN_BROWSER_WINDOW = 'OPEN_BROWSER_WINDOW';
export const PREFERENCE_ALLOCATE_ID = 'PREFERENCE_ALLOCATE_ID';
export const PREFERENCE_OPEN = 'PREFERENCE_OPEN';
export const PREFERENCE_CLOSE = 'PREFERENCE_CLOSE';
export const SET_HOT_KEY_SEARCH_WINDOW = 'SET_HOT_KEY_SEARCH_WINDOW';
export const SET_INITIAL_STORE = 'SET_INITIAL_STORE';
export const SET_LANGUAGE_ENGLISH = 'SET_LANGUAGE_ENGLISH';
Expand All @@ -15,11 +11,8 @@ export const TOGGLE_WIDGET_DEFAULT_USER_AGENT = 'TOGGLE_WIDGET_DEFAULT_USER_AGEN
export const SEARCH_APP_QUIT = 'SEARCH_APP_QUIT';
export const SEARCH_CHANGE_KEYWORD = 'SEARCH_CHANGE_KEYWORD';
export const SEARCH_SET_FILTER = 'SEARCH_SET_FILTER';
export const SEARCH_TRAY_OPEN = 'SEARCH_TRAY_OPEN';
export const SEARCH_TRAY_CLOSE = 'SEARCH_TRAY_CLOSE';
export const SEARCH_WIDGET_SELECT_INCREASE = 'SEARCH_WIDGET_SELECT_INCREASE';
export const SEARCH_WIDGET_SELECT_DECREASE = 'SEARCH_WIDGET_SELECT_DECREASE';
export const SEARCH_WINDOW_HIDE = 'SEARCH_WINDOW_HIDE';
export const UPDATE_CHECK_REQUEST = 'UPDATE_CHECK_REQUEST';
export const UPDATE_CHECK_REQUEST_ON_MANUAL = 'UPDATE_CHECK_REQUEST_ON_MANUAL';
export const UPDATE_CHECK_SUCCESS = 'UPDATE_CHECK_SUCCESS';
Expand Down
Loading

0 comments on commit 2951f81

Please sign in to comment.