Merge pull request #487 from ueokande/remove-adjacenttab-prperty

Remove adjacenttab
jh-changes
Shin'ya Ueoka 6 years ago committed by GitHub
commit b0490c0cdd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      QA.md
  2. 15
      README.md
  3. 12
      src/background/presenters/tab.js
  4. 9
      src/background/usecases/link.js
  5. 1
      src/shared/settings/default.js
  6. 3
      src/shared/settings/properties.js

@ -50,8 +50,6 @@ The behaviors of the console are tested in [Console section](#consoles).
- [ ] Open new tab in background by `"background": true`
- [ ] Configure custom hint character by `:set hintchars=012345678`
- [ ] Configure custom hint character by settings `"hintchars": "012345678"` in add-on preferences
- [ ] Configure adjacent tab by `:set adjacenttab`
- [ ] Configure adjacent tab by settings `adjacenttab: true` in add-on preferences
- [ ] Opened tabs is in child on Tree Style Tab
### Consoles

@ -193,7 +193,7 @@ settings:
```json
{
"properties": {
"adjacenttab": false
"complete": "sbh"
}
}
```
@ -219,19 +219,6 @@ Set hint characters
:set hintchars=0123456789
```
#### `adjacenttab` property
Open a new tab on adjacent of the current tab.
```
:set noadjacenttab " open a tab at last
:set adjacenttab " open a tab adjacently
```
For developers and contributors: you can look at
[#303](https://github.com/ueokande/vim-vixen/pull/303) for more details about
properties implementation and usage.
### Search engines
Vim Vixen supports search by search engines like Google and Yahoo.

@ -85,18 +85,6 @@ export default class TabPresenter {
return browser.tabs.setZoom(tabId, factor);
}
async createAdjacent(url, { openerTabId, active }) {
let tabs = await browser.tabs.query({
active: true, currentWindow: true
});
return browser.tabs.create({
url,
openerTabId,
active,
index: tabs[0].index + 1
});
}
onSelected(listener) {
browser.tabs.onActivated.addListener(listener);
}

@ -11,14 +11,7 @@ export default class LinkInteractor {
return this.tabPresenter.open(url, tabId);
}
async openNewTab(url, openerId, background) {
let settings = await this.settingRepository.get();
let { adjacenttab } = settings.properties;
if (adjacenttab) {
return this.tabPresenter.createAdjacent(url, {
openerTabId: openerId, active: !background
});
}
openNewTab(url, openerId, background) {
return this.tabPresenter.create(url, {
openerTabId: openerId, active: !background
});

@ -74,7 +74,6 @@ export default {
"properties": {
"hintchars": "abcdefghijklmnopqrstuvwxyz",
"smoothscroll": false,
"adjacenttab": true,
"complete": "sbh"
},
"blacklist": [

@ -5,7 +5,6 @@
const types = {
hintchars: 'string',
smoothscroll: 'boolean',
adjacenttab: 'boolean',
complete: 'string',
};
@ -13,14 +12,12 @@ const types = {
const defaults = {
hintchars: 'abcdefghijklmnopqrstuvwxyz',
smoothscroll: false,
adjacenttab: true,
complete: 'sbn',
};
const docs = {
hintchars: 'hint characters on follow mode',
smoothscroll: 'smooth scroll',
adjacenttab: 'open adjacent tabs',
complete: 'which are completed at the open page',
};