An open API service indexing awesome lists of open source software.

https://github.com/ahimta/speed-dial-quantum

Minimal speed-dial extension with support for keyboard shortcuts & importing Speed Dial pages
https://github.com/ahimta/speed-dial-quantum

chrome chrome-extension firefox firefox-quantum firefox-webextension keyboard-shortcuts newtab shortcut speed-dial

Last synced: 3 months ago
JSON representation

Minimal speed-dial extension with support for keyboard shortcuts & importing Speed Dial pages

Awesome Lists containing this project

README

          

# Speed Dial Quantum

[![Travis](https://img.shields.io/travis/Ahimta/speed-dial-quantum.svg?style=flat-square)](https://travis-ci.org/Ahimta/speed-dial-quantum)
[![Known Vulnerabilities](https://snyk.io/test/github/Ahimta/speed-dial-quantum/badge.svg?style=flat-square)](https://snyk.io/test/github/Ahimta/speed-dial-quantum)
[![Code Climate](https://img.shields.io/codeclimate/maintainability/Ahimta/speed-dial-quantum.svg?style=flat-square)](https://codeclimate.com/github/Ahimta/speed-dial-quantum/maintainability)
[![Code Climate](https://img.shields.io/codeclimate/Ahimta/speed-dial-quantum.svg?style=flat-square)](https://codeclimate.com/github/Ahimta/speed-dial-quantum/test_coverage)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg?style=flat-square)](https://standardjs.com)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![license](https://img.shields.io/github/license/Ahimta/speed-dial-quantum.svg?style=flat-square)](https://github.com/Ahimta/speed-dial-quantum)
[![Inline docs](http://inch-ci.org/github/Ahimta/speed-dial-quantum.svg?branch=master&style=flat-square)](http://inch-ci.org/github/Ahimta/speed-dial-quantum)

[![Mozilla Add-on](https://img.shields.io/amo/v/speed-dial-quantum.svg?style=flat-square)](https://addons.mozilla.org/en-GB/firefox/addon/speed-dial-quantum)
[![Mozilla Add-on](https://img.shields.io/amo/d/speed-dial-quantum.svg?style=flat-square)](https://addons.mozilla.org/en-GB/firefox/addon/speed-dial-quantum/)
[![Mozilla Add-on](https://img.shields.io/amo/users/speed-dial-quantum.svg?style=flat-square)](https://addons.mozilla.org/en-GB/firefox/addon/speed-dial-quantum/)
[![Mozilla Add-on](https://img.shields.io/amo/stars/speed-dial-quantum.svg?style=flat-square)](https://addons.mozilla.org/en-GB/firefox/addon/speed-dial-quantum)

[![Chrome Web Store](https://img.shields.io/chrome-web-store/v/fadmmkodlffpamiglnmodpkmbpalbkmp.svg?style=flat-square)](https://chrome.google.com/webstore/detail/speed-dial-quantum/fadmmkodlffpamiglnmodpkmbpalbkmp)
[![Chrome Web Store](https://img.shields.io/chrome-web-store/users/fadmmkodlffpamiglnmodpkmbpalbkmp.svg?style=flat-square)](https://chrome.google.com/webstore/detail/speed-dial-quantum/fadmmkodlffpamiglnmodpkmbpalbkmp)
[![Chrome Web Store](https://img.shields.io/chrome-web-store/stars/fadmmkodlffpamiglnmodpkmbpalbkmp.svg?style=flat-square)](https://chrome.google.com/webstore/detail/speed-dial-quantum/fadmmkodlffpamiglnmodpkmbpalbkmp)
[![Chrome Web Store](https://img.shields.io/chrome-web-store/price/fadmmkodlffpamiglnmodpkmbpalbkmp.svg?style=flat-square)](https://chrome.google.com/webstore/detail/speed-dial-quantum/fadmmkodlffpamiglnmodpkmbpalbkmp)

Minimal speed-dial extension with support for keyboard shortcuts & importing Speed Dial pages

## Prerequisites

1. Node (using version in `.nvmrc`)
2. yarn (can be installed using just `npm install --global yarn`)

## Build

```bash
yarn install --emoji
yarn run build
```

## Develop

```bash
yarn install --emoji
yarn run build
yarn start

# in another terminal window/tab
yarn run watch
```

## Test

```bash
yarn install --emoji
yarn run build
yarn test

# for test coverage (`coverage/lcov-report/index.html` will be generated)
yarn run coverage
```

## Package

```bash
yarn install --emoji
NODE_ENV=production yarn run build
yarn run package
```

## Publish Packeged Extension

1. Make sure you've made a release commit that only updates the version and have a `Release :smiley:` message
2. Clone the repo locally and zip it (to upload it later to Mozilla). Using something like `cd && git clone && zip -r speed-dial-quantum.zip speed-dial-quantum`
3. Go to extension's Mozilla page and submit packaged extension (enabling only desktop platforms and not Android) and don't forget to upload the cloned local repo (required by Mozilla because the code is transformed using Rollup, etc...)
4. Go to extension's Chrome store page and submit packaged extension and don't forget to publish it

## Upgrade Packages

1. Run `yarn outdated --emoji`
2. Check changelogs from URLs
3. Run `yarn upgrade --emoji`
4. Run `yarn add @^ --emoji` for breaking updates
5. Run `yarn run audit` to check for vulnerabilities
6. Make sure `yarn run {build,package,test,watch}` still work correctly

## Download & Update Static Dependencies

1. `cd vendor`
2. Download using `wget -O -. `
3. Run `cat | openssl dgst -sha384 -binary | openssl base64 -A`
4. Copy output and add it as an `integrity` HTML atribute
5. Update HTML's tag reference (`href` or `src`)
6. Remove older version files
7. Try the extension and make sure everything works

## Clean

`yarn run clean`

## Design (in Scala)

### Entities

```scala
Thumbnail(
id: String,
groupId: String,

title: Option[String],
url: Option[String],
// @deprecated
imgUrl: Option[String],

faviconImgUrl: () => String
)

Group(
id: String,
name: String,

rows: Option[Int],
cols: Option[Int],
thumbnailImgSize: Option["auto" | "small" | "medium" | "large"],

thumbnails: () => Array[Thumbnail],
)

Tab(groups: Array[Group], thumbnails: Array[Thumbnail])
```

### Constraints

```scala
Tab#groups.map(g => g.thumbnails().length).sum() == Tab#thumbnails.length
```

## Known Issues & Limitations

- Keyboard shortcuts only work when the page is focused (because a content
script is used)
- `Alt` shortcuts don't work properly on Firefox Windows:sweat_smile:

## Todo

- Replace injected web scripts with global shortcut
- Add specs for `tab` and `thumbnail` entites
- Auomated tests, better architecture, etc...