Skip to content

Commit

Permalink
[update docs] documentation overhaul (#3138)
Browse files Browse the repository at this point in the history
* quickstarts and userguides

* repositioning docs, edit quickstart guides, user guide, screenshot refreshes, consolidated docs revamp

* adding cancer landing page with some placeholders, userguide updates

* splitting config guide to expose components that are only talked about in that guide, moving to "advanced" to not confuse general users

* consolidating api guide, updating plugin guide

* [update docs] userguide updates, devguide updates, faq, api, tutorials, WIP plugin tutorial, SS updates

* [update docs] fixing broken links and faq

* [update docs] final touches on dev tutorial 1

* no build plugin tutorial

* plugin usage guides

* revert changes to file structure to preserve historical links

* build

* Fix build complaints

* Underscore in user_guide

* Misc

* lint and minor sidebar arrangement

* moving const

* hiding cancer portal until we have a refreshed video to display

Co-authored-by: Colin <colin.diesh@gmail.com>
  • Loading branch information
carolinebridge and cmdcolin committed Sep 2, 2022
1 parent 8a12788 commit 7ed81c2
Show file tree
Hide file tree
Showing 88 changed files with 3,998 additions and 2,388 deletions.
13 changes: 3 additions & 10 deletions products/jbrowse-web/src/Loader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,6 @@ function NoConfigMessage() {
Configuration not found. You may have arrived here if you requested a
config that does not exist or you have not set up your JBrowse yet.
</h4>

<p>
If you want to complete your setup, visit our{' '}
<a href="https://jbrowse.org/jb2/docs/quickstart_web">
Quick start guide
</a>
</p>

{inDevelopment ? (
<>
<div>Sample JBrowse configs:</div>
Expand Down Expand Up @@ -192,9 +184,10 @@ const ErrMessage = ({ err }: { err: unknown }) => {
>
No config.json found. If you want to learn how to complete your setup,
visit our{' '}
<a href="https://jbrowse.org/jb2/docs/quickstart_web">
Quick start guide
<a href="https://jbrowse.org/jb2/docs/quickstarts/quickstart_web/">
quick start guide
</a>
.
</div>
) : (
<Suspense fallback={<div>Loading...</div>}>
Expand Down
2 changes: 1 addition & 1 deletion website/docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ cli.md: ../../products/jbrowse-cli/README.md
cp $^ $@

combined.md: $(SRC_FILES)
(echo '---\ntitle: JBrowse 2 combined guide\nid: combined\n---\n\nThis document is a collection of all our documentation. It includes our quick start guide, user guide, configuration guide, CLI guide, developer guide, and FAQ. You can browse the other documents individually, but this page is to help simple ctrl+f searching and easy browsing. You can also download a pdf version of these same docs located at https://jbrowse.org/jb2/jbrowse2.pdf\n\nimport Figure from "./figure"' && for f in $^; do cat $$f | node md_parser.js; done) > $@
(echo '---\ntitle: Consolidated docs\nid: combined\n---\n\nThis document is a collection of all our documentation. It includes our quick start guides, user guides, configuration guides, CLI guides, developer guides, and FAQ.\n:::info Note\nYou can browse the other documents individually using the sidebar on the left. **This page is to help simplify `ctrl+f` searching and easy browsing.**\n:::\nYou can also download a pdf version of these same docs located at https://jbrowse.org/jb2/jbrowse2.pdf.\n\nimport Figure from "./figure"\nimport config from "../docusaurus.config.json"' && for f in $^; do cat $$f | node md_parser.js; done) > $@

clean:
git clean -fdx .
Expand Down
32 changes: 15 additions & 17 deletions website/docs/api_guide.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
id: api_guide
title: API guide
title: API
toplevel: true
---

import Figure from './figure'

In this guide, will cover API level documentation e.g. methods that can be
called on different objects and data model formats
This guide will cover the API level documentation for methods and tools
useful to developers looking to enhance JBrowse or write plugins.

## MenuItems objects

Expand Down Expand Up @@ -108,7 +108,7 @@ As an example, the here is an array of MenuItems and the resulting menu:
Users can customize the top-level menu items using these functions that are
available on the rootModel:

#### appendMenu
#### `appendMenu`

Add a top-level menu

Expand All @@ -122,7 +122,7 @@ Add a top-level menu

The new length of the top-level menus array

#### insertMenu
#### `insertMenu`

Insert a top-level menu

Expand All @@ -137,7 +137,7 @@ Insert a top-level menu

The new length of the top-level menus array

#### appendToMenu
#### `appendToMenu`

Add a menu item to a top-level menu

Expand All @@ -152,7 +152,7 @@ Add a menu item to a top-level menu

The new length of the menu

#### insertInMenu
#### `insertInMenu`

Insert a menu item into a top-level menu

Expand All @@ -168,7 +168,7 @@ Insert a menu item into a top-level menu

The new length of the menu

#### appendToSubMenu
#### `appendToSubMenu`

Add a menu item to a sub-menu

Expand All @@ -183,7 +183,7 @@ Add a menu item to a sub-menu

The new length of the sub-menu

#### insertInSubMenu
#### `insertInSubMenu`

Insert a menu item into a sub-menu

Expand All @@ -202,30 +202,28 @@ The new length of the sub-menu
## Extension points

In the core codebase, we have the concept of extension points that users can
call or add to
call or add to.

The API is

```js
pluginManager.evaluateExtensionPoint(extensionPointName, args)
```

There is also an async version
There is also an async method:

```js
pluginManager.evaluateAsyncExtensionPoint(extensionPointName, args)
```

Users can additionall add to extension points, so that when they are evaluated,
it runs a chain of callbacks that are registered to that extension point

This looks like
Users can additionally add to extension points, so that when they are evaluated,
it runs a chain of callbacks that are registered to that extension point:

```js
pluginManager.addToExtensionPoint(extensionPointName, callback => newArgs)
```

Here are the extension points in the core codebase
Here are the extension points in the core codebase:

### Core-extendPluggableElement

Expand Down Expand Up @@ -268,4 +266,4 @@ hierarchical track menu when tracks are added to the selection

Users that want to add further extension points can do so. The naming system,
"Core-" just refers to the fact that these extension points are from our core
codebase. Plugin developers may choose their own prefix to avoid collisions
codebase. Plugin developers may choose their own prefix to avoid collisions.
Loading

0 comments on commit 7ed81c2

Please sign in to comment.