Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ out
.env
extension.js
extension.js.LICENSE.txt
local/
66 changes: 11 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,60 +1,16 @@
# RoamJS Extension Base
# Quick Switcher

Stock base for [RoamJS](https://roamjs.com) Roam Research extensions. **Fork this repo** to start a new extension.
<a href="https://roamjs.com/">
<img src="https://avatars.githubusercontent.com/u/138642184" alt="RoamJS Logo" title="RoamJS" align="right" height="60" />
</a>

## What's included
**Jump to saved pages from a searchable switcher, direct keyboard shortcuts, and quick-open workflows built for fast graph navigation.**

- **roamjs-components** — shared utilities, DOM helpers, queries, writes, and UI components
- **Samepage build** — `samepage build` produces the Roam Depot–ready bundle
- **Settings panel** — example `extensionAPI.settings.panel.create` with an Enable switch
- **TypeScript** — tsconfig extending `@samepage/scripts`
- **CI** — GitHub Actions to build on push/PR (uses RoamJS secrets for publish)
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/RoamJS/quick-switcher)

## After forking
## Features

1. **Rename the repo** and update `package.json`:
- `name`: your extension slug (e.g. `my-extension`)
- `description`: one line describing the extension

2. **Implement in `src/index.ts`**:
- Keep or replace the settings panel
- Add your logic using `roamjs-components` (e.g. `createHTMLObserver`, `createBlock`, `renderToast`)
- Return `{ unload }` to clean up on unload

3. **Update all instances of `{Extension Name}` to the name of the extension.**

### Rules for Agents updating this README.md

- refer to README-TEMPLATE.md for the structure of the README.md
- This is a marketing document. It is user facing, not developer facing.
- Do not include reference to Roam Research (eg: This is a Roam Research extension), that is implied.
- Do not include build instructions (eg: `npm run build:roam`).
- update `# RoamJS Extension Base` to the name of the extension.
- update askdeepwiki badge to the name of the extension.
- update the description to be a < 250 character description of the extension. This should be enticing to new users to install the extension.
- add a `## Features` section to the README.md with a list of the features of the extension.

3. **Prefer**: Add React components under `src/components/` (see [autocomplete](https://github.com/RoamJS/autocomplete), [giphy](https://github.com/RoamJS/giphy) for examples).

4. **Secrets (for publish)** — in the forked repo, configure:
- `ROAMJS_RELEASE_TOKEN`, `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`
- `AWS_REGION`, `ROAMJS_PROXY` (vars)

## Scripts

- `npm start` — samepage dev (local development)
- `npm run build:roam` — build for Roam (dry run; CI runs `npx samepage build`)

## License

MIT

# To Do

- Move the management of pages to a popup or dropdown.
- On the settings page, just list the pages for now; move the full settings experience into a custom popup so it does not get ugly or crowded.
- Fix load behavior; something currently requires two reloads before the plugin loads.
- Investigate why pages do not require keyboard shortcuts.
- Add support for adding many pages more easily.
- Add a Query Builder query so dynamic pages can be added via Query Builder.
- Support adding blocks too.
- Save frequently used pages as Quick Switcher entries.
- Open saved pages from a focused searchable dialog.
- Assign direct keyboard shortcuts for one-step page switching.
- Reorder and remove saved pages from extension settings.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "extension-base",
"name": "quick-switcher",
"version": "1.0.0",
"description": "Stock RoamJS Roam Research Extension base — fork this repo to start new extensions.",
"description": "Jump to saved pages from a searchable switcher and direct keyboard shortcuts.",
"main": "index.js",
"scripts": {
"postinstall": "patch-package",
Expand Down
Loading