commit
2795025d0a
10 changed files with 1438 additions and 1016 deletions
20
QA.md
20
QA.md
|
@ -30,6 +30,8 @@ The behaviors of the console are tested in [Console section](#consoles).
|
||||||
- [ ] <kbd>y</kbd>: yank current URL and show a message
|
- [ ] <kbd>y</kbd>: yank current URL and show a message
|
||||||
- [ ] <kbd>p</kbd>: open clipboard's URL in current tab
|
- [ ] <kbd>p</kbd>: open clipboard's URL in current tab
|
||||||
- [ ] <kbd>P</kbd>: open clipboard's URL in new tab
|
- [ ] <kbd>P</kbd>: open clipboard's URL in new tab
|
||||||
|
- [ ] <kbd>p</kbd>: search clipboard's keywords in current tab
|
||||||
|
- [ ] <kbd>P</kbd>: search clipboard's keywords in new tab
|
||||||
- [ ] Toggle enabled/disabled of plugin bu <kbd>Shift</kbd>+<kbd>Esc</kbd>
|
- [ ] Toggle enabled/disabled of plugin bu <kbd>Shift</kbd>+<kbd>Esc</kbd>
|
||||||
- [ ] Hide error and info console by <kbd>Esc</kbd>
|
- [ ] Hide error and info console by <kbd>Esc</kbd>
|
||||||
- [ ] Vim-Vixen icons changes on <kbd>Shift</kbd>+<kbd>Esc</kbd>
|
- [ ] Vim-Vixen icons changes on <kbd>Shift</kbd>+<kbd>Esc</kbd>
|
||||||
|
@ -56,32 +58,35 @@ The behaviors of the console are tested in [Console section](#consoles).
|
||||||
|
|
||||||
#### Exec a command
|
#### Exec a command
|
||||||
|
|
||||||
- [ ] `<EMPTY>`, `<SP>`: do nothing
|
- [ ] `<EMPTY>`: do nothing
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
- [ ] `open an apple`: search with keywords "an apple" by default search engine (google)
|
- [ ] `open an apple`: search with keywords "an apple" by default search engine (google)
|
||||||
- [ ] `open github.com`: open github.com
|
- [ ] `open github.com`: open github.com
|
||||||
- [ ] `open https://github.com`: open github.com
|
- [ ] `open https://github.com`: open github.com
|
||||||
- [ ] `open yahoo an apple`: search with keywords "an apple" by yahoo.com
|
- [ ] `open yahoo an apple`: search with keywords "an apple" by yahoo.com
|
||||||
- [ ] `open yahoo`,`open yahoo<SP>`: search with empty keywords; yahoo redirects to top page
|
- [ ] `open yahoo`: search with empty keywords; yahoo redirects to top page
|
||||||
- [ ] `open`,`open<SP>`: open default search engine
|
- [ ] `open`: open default search engine
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
- [ ] `tabopen`: do above tests replaced `open` with `tabopen`, and verify the page is opened in new tab
|
- [ ] `tabopen`: do above tests replaced `open` with `tabopen`, and verify the page is opened in new tab
|
||||||
- [ ] `winopen`: do above tests replaced `open` with `winopen`, and verify the page is opened in new window
|
- [ ] `winopen`: do above tests replaced `open` with `winopen`, and verify the page is opened in new window
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
- [ ] `buffer`,`buffer<SP>`: do nothing
|
- [ ] `buffer`: do nothing
|
||||||
- [ ] `buffer <title>`, `buffer <url>`: select tab which has an title matched with
|
- [ ] `buffer <title>`, `buffer <url>`: select tab which has an title matched with
|
||||||
- [ ] `buffer 1`: select leftmost tab
|
- [ ] `buffer 1`: select leftmost tab
|
||||||
- [ ] `buffer 0`, `buffer <a number more than count of tabs>`: shows an error
|
- [ ] `buffer 0`, `buffer <a number more than count of tabs>`: shows an error
|
||||||
- [ ] select tabs rotationally when more than two tabs are matched
|
- [ ] select tabs rotationally when more than two tabs are matched
|
||||||
|
- [ ] `buffer %`: select current tab (nothing to do)
|
||||||
|
- [ ] `buffer #`: select last selected tab
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
- [ ] `addbookmark` creates a bookmark
|
- [ ] `addbookmark` creates a bookmark
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
- [ ] `q`, `quit`: close current tab
|
- [ ] `q`, `quit`: close current tab
|
||||||
|
- [ ] `qa`, `quitall`: close all tabs
|
||||||
- [ ] `bdelete`: delete a not-pinned tab matches with keywords
|
- [ ] `bdelete`: delete a not-pinned tab matches with keywords
|
||||||
- [ ] `bdelete`: show errors no-tabs or more than 1 tabs matched
|
- [ ] `bdelete`: show errors no-tabs or more than 1 tabs matched
|
||||||
- [ ] `bdelete`: can not delete pinned tab
|
- [ ] `bdelete`: can not delete pinned tab
|
||||||
|
@ -94,20 +99,20 @@ The behaviors of the console are tested in [Console section](#consoles).
|
||||||
|
|
||||||
#### History and search engines
|
#### History and search engines
|
||||||
|
|
||||||
- [ ] `open`: show no completions
|
|
||||||
- [ ] `open<SP>`: show all engines and some history items
|
- [ ] `open<SP>`: show all engines and some history items
|
||||||
- [ ] `open g`: complete search engines starts with `g` and matched with keywords `g`
|
- [ ] `open g`: complete search engines starts with `g` and matched with keywords `g`
|
||||||
- [ ] `open foo bar`: complete history items matched with keywords `foo` and `bar`
|
- [ ] `open foo bar`: complete history items matched with keywords `foo` and `bar`
|
||||||
|
- [ ] `set `: show prperties starts with keywords
|
||||||
- [ ] The completions shows histories, search engines, and bookmarks.
|
- [ ] The completions shows histories, search engines, and bookmarks.
|
||||||
- [ ] also `tabopen` and `winopen`
|
- [ ] also `tabopen` and `winopen`
|
||||||
- shortening commands such as `o` are not test in this release
|
- shortening commands such as `o` are not test in this release
|
||||||
- [ ] Show completions for `:open`/`:tabopen`/`:buffer` on opening just after closed
|
- [ ] Complete commands matched with input keywords in the prefix.
|
||||||
|
|
||||||
#### Buffer command
|
#### Buffer command
|
||||||
|
|
||||||
- [ ] `buffer`: show no completions
|
|
||||||
- [ ] `buffer<SP>`: show all opened tabs in completion
|
- [ ] `buffer<SP>`: show all opened tabs in completion
|
||||||
- [ ] `buffer x`: show tabs which has title and URL matches with `x`
|
- [ ] `buffer x`: show tabs which has title and URL matches with `x`
|
||||||
|
- [ ] shows tab index and marks
|
||||||
|
|
||||||
#### Buffer command
|
#### Buffer command
|
||||||
|
|
||||||
|
@ -207,7 +212,6 @@ The behaviors of the console are tested in [Console section](#consoles).
|
||||||
|
|
||||||
## Misc
|
## Misc
|
||||||
|
|
||||||
- [ ] Work after plugin reload
|
|
||||||
- [ ] Work on `about:blank`
|
- [ ] Work on `about:blank`
|
||||||
- [ ] Able to map `<A-Z>` key.
|
- [ ] Able to map `<A-Z>` key.
|
||||||
- [ ] Open file menu by <kbd>Alt</kbd>+<kbd>F</kbd> (Other than Mac OS)
|
- [ ] Open file menu by <kbd>Alt</kbd>+<kbd>F</kbd> (Other than Mac OS)
|
||||||
|
|
2373
package-lock.json
generated
2373
package-lock.json
generated
File diff suppressed because it is too large
Load diff
22
package.json
22
package.json
|
@ -23,16 +23,16 @@
|
||||||
"homepage": "https://github.com/ueokande/vim-vixen",
|
"homepage": "https://github.com/ueokande/vim-vixen",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel-cli": "^6.26.0",
|
"babel-cli": "^6.26.0",
|
||||||
"babel-eslint": "^8.2.3",
|
"babel-eslint": "^8.2.6",
|
||||||
"babel-loader": "^7.1.4",
|
"babel-loader": "^7.1.5",
|
||||||
"babel-preset-preact": "^1.1.0",
|
"babel-preset-preact": "^1.1.0",
|
||||||
"babel-preset-stage-2": "^6.24.1",
|
"babel-preset-stage-2": "^6.24.1",
|
||||||
"chai": "^4.1.2",
|
"chai": "^4.1.2",
|
||||||
"css-loader": "^1.0.0",
|
"css-loader": "^1.0.0",
|
||||||
"eslint": "^5.0.1",
|
"eslint": "^5.2.0",
|
||||||
"eslint-plugin-react": "^7.8.2",
|
"eslint-plugin-react": "^7.10.0",
|
||||||
"html-webpack-plugin": "^3.2.0",
|
"html-webpack-plugin": "^3.2.0",
|
||||||
"karma": "^2.0.2",
|
"karma": "^2.0.5",
|
||||||
"karma-firefox-launcher": "^1.1.0",
|
"karma-firefox-launcher": "^1.1.0",
|
||||||
"karma-html2js-preprocessor": "^1.1.0",
|
"karma-html2js-preprocessor": "^1.1.0",
|
||||||
"karma-mocha": "^1.3.0",
|
"karma-mocha": "^1.3.0",
|
||||||
|
@ -40,19 +40,19 @@
|
||||||
"karma-sinon": "^1.0.5",
|
"karma-sinon": "^1.0.5",
|
||||||
"karma-sourcemap-loader": "^0.3.7",
|
"karma-sourcemap-loader": "^0.3.7",
|
||||||
"karma-webpack": "^3.0.0",
|
"karma-webpack": "^3.0.0",
|
||||||
"mocha": "^5.1.1",
|
"mocha": "^5.2.0",
|
||||||
"node-firefox-connect": "^1.2.0",
|
"node-firefox-connect": "^1.2.0",
|
||||||
"node-sass": "^4.9.0",
|
"node-sass": "^4.9.2",
|
||||||
"preact": "^8.2.9",
|
"preact": "^8.2.9",
|
||||||
"preact-redux": "^2.0.3",
|
"preact-redux": "^2.0.3",
|
||||||
"redux": "^4.0.0",
|
"redux": "^4.0.0",
|
||||||
"redux-promise": "^0.6.0",
|
"redux-promise": "^0.6.0",
|
||||||
"sass-loader": "^7.0.1",
|
"sass-loader": "^7.0.3",
|
||||||
"sinon-chrome": "^2.3.2",
|
"sinon-chrome": "^2.3.2",
|
||||||
"style-loader": "^0.21.0",
|
"style-loader": "^0.21.0",
|
||||||
"web-ext": "github:ueokande/web-ext#patched-2.6.0",
|
"web-ext": "github:ueokande/web-ext#patched-2.7.0",
|
||||||
"webextensions-api-fake": "^0.5.1",
|
"webextensions-api-fake": "^0.5.1",
|
||||||
"webpack": "^4.8.3",
|
"webpack": "^4.16.3",
|
||||||
"webpack-cli": "^3.0.7"
|
"webpack-cli": "^3.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ export default class LinkInteractor {
|
||||||
let settings = await this.settingRepository.get();
|
let settings = await this.settingRepository.get();
|
||||||
let { adjacenttab } = settings.properties;
|
let { adjacenttab } = settings.properties;
|
||||||
if (adjacenttab) {
|
if (adjacenttab) {
|
||||||
return this.tabPresenter.create(url, {
|
return this.tabPresenter.createAdjacent(url, {
|
||||||
openerTabId: openerId, active: !background
|
openerTabId: openerId, active: !background
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,6 +68,7 @@ class SettingsComponent extends Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
let fields = null;
|
let fields = null;
|
||||||
|
let disabled = this.props.error.length > 0;
|
||||||
if (this.props.source === 'form') {
|
if (this.props.source === 'form') {
|
||||||
fields = this.renderFormFields(this.props.form);
|
fields = this.renderFormFields(this.props.form);
|
||||||
} else if (this.props.source === 'json') {
|
} else if (this.props.source === 'json') {
|
||||||
|
@ -84,7 +85,8 @@ class SettingsComponent extends Component {
|
||||||
label='Use form'
|
label='Use form'
|
||||||
checked={this.props.source === 'form'}
|
checked={this.props.source === 'form'}
|
||||||
value='form'
|
value='form'
|
||||||
onChange={this.bindSource.bind(this)} />
|
onChange={this.bindSource.bind(this)}
|
||||||
|
disabled={disabled} />
|
||||||
|
|
||||||
<Input
|
<Input
|
||||||
type='radio'
|
type='radio'
|
||||||
|
@ -92,8 +94,8 @@ class SettingsComponent extends Component {
|
||||||
label='Use plain JSON'
|
label='Use plain JSON'
|
||||||
checked={this.props.source === 'json'}
|
checked={this.props.source === 'json'}
|
||||||
value='json'
|
value='json'
|
||||||
onChange={this.bindSource.bind(this)} />
|
onChange={this.bindSource.bind(this)}
|
||||||
|
disabled={disabled} />
|
||||||
{ fields }
|
{ fields }
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -128,6 +130,7 @@ class SettingsComponent extends Component {
|
||||||
} else if (from === 'json' && to === 'form') {
|
} else if (from === 'json' && to === 'form') {
|
||||||
let b = window.confirm(DO_YOU_WANT_TO_CONTINUE);
|
let b = window.confirm(DO_YOU_WANT_TO_CONTINUE);
|
||||||
if (!b) {
|
if (!b) {
|
||||||
|
this.forceUpdate();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.props.dispatch(settingActions.switchToForm(this.props.json));
|
this.props.dispatch(settingActions.switchToForm(this.props.json));
|
||||||
|
|
|
@ -14,11 +14,10 @@ export default function reducer(state = defaultState, action = {}) {
|
||||||
source: action.source,
|
source: action.source,
|
||||||
json: action.json,
|
json: action.json,
|
||||||
form: action.form,
|
form: action.form,
|
||||||
errors: '',
|
|
||||||
error: '', };
|
error: '', };
|
||||||
case actions.SETTING_SHOW_ERROR:
|
case actions.SETTING_SHOW_ERROR:
|
||||||
return { ...state,
|
return { ...state,
|
||||||
error: action.text,
|
error: action.error,
|
||||||
json: action.json, };
|
json: action.json, };
|
||||||
case actions.SETTING_SWITCH_TO_FORM:
|
case actions.SETTING_SWITCH_TO_FORM:
|
||||||
return { ...state,
|
return { ...state,
|
||||||
|
|
|
@ -40,7 +40,7 @@ export default {
|
||||||
"zi": { "type": "zoom.in" },
|
"zi": { "type": "zoom.in" },
|
||||||
"zo": { "type": "zoom.out" },
|
"zo": { "type": "zoom.out" },
|
||||||
"zz": { "type": "zoom.neutral" },
|
"zz": { "type": "zoom.neutral" },
|
||||||
"f": { "type": "follow.start", "newTab": false, "background": false },
|
"f": { "type": "follow.start", "newTab": false },
|
||||||
"F": { "type": "follow.start", "newTab": true, "background": false },
|
"F": { "type": "follow.start", "newTab": true, "background": false },
|
||||||
"H": { "type": "navigate.history.prev" },
|
"H": { "type": "navigate.history.prev" },
|
||||||
"L": { "type": "navigate.history.next" },
|
"L": { "type": "navigate.history.next" },
|
||||||
|
@ -70,6 +70,11 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"properties": {
|
"properties": {
|
||||||
}
|
"hintchars": "abcdefghijklmnopqrstuvwxyz",
|
||||||
|
"smoothscroll": false,
|
||||||
|
"adjacenttab": true
|
||||||
|
},
|
||||||
|
"blacklist": [
|
||||||
|
]
|
||||||
}`,
|
}`,
|
||||||
};
|
};
|
||||||
|
|
|
@ -16,7 +16,7 @@ const defaults = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const docs = {
|
const docs = {
|
||||||
hintchars: 'Hint characters on follow mode',
|
hintchars: 'hint characters on follow mode',
|
||||||
smoothscroll: 'smooth scroll',
|
smoothscroll: 'smooth scroll',
|
||||||
adjacenttab: 'open adjacent tabs',
|
adjacenttab: 'open adjacent tabs',
|
||||||
};
|
};
|
||||||
|
|
|
@ -27,7 +27,7 @@ const validateKeymaps = (keymaps) => {
|
||||||
const validateSearch = (search) => {
|
const validateSearch = (search) => {
|
||||||
let engines = search.engines;
|
let engines = search.engines;
|
||||||
for (let key of Object.keys(engines)) {
|
for (let key of Object.keys(engines)) {
|
||||||
if (/\s/.test(key)) {
|
if ((/\s/).test(key)) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`While space in search engine name is not allowed: "${key}"`
|
`While space in search engine name is not allowed: "${key}"`
|
||||||
);
|
);
|
||||||
|
|
|
@ -25,7 +25,7 @@ describe("settings setting reducer", () => {
|
||||||
it('return next state for SETTING_SHOW_ERROR', () => {
|
it('return next state for SETTING_SHOW_ERROR', () => {
|
||||||
let action = {
|
let action = {
|
||||||
type: actions.SETTING_SHOW_ERROR,
|
type: actions.SETTING_SHOW_ERROR,
|
||||||
text: 'bad value',
|
error: 'bad value',
|
||||||
json: '{}',
|
json: '{}',
|
||||||
};
|
};
|
||||||
let state = settingReducer(undefined, action);
|
let state = settingReducer(undefined, action);
|
||||||
|
|
Reference in a new issue