Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix website documentation sidebar on browsers with prefers-reduced-motion #3671

Merged
merged 2 commits into from
Apr 28, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -154,16 +154,13 @@ function PluginStoreWidget({ model }: { model: PluginStoreModel }) {
) : pluginArray ? (
pluginArray
.filter(plugin => {
// If pugin only has cjsUrl, don't display outside desktop
if (
!isElectron &&
!(plugin.esmUrl || plugin.url || plugin.umdUrl)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

afaik this would filter out e.g. esmLoc,umdLoc which we do not want. note we do not have a cjsLoc...not sure if we need it

) {
return false
}
return plugin.name
.toLowerCase()
.includes(model.filterText.toLowerCase())
// If plugin only has cjsUrl, don't display outside desktop
return (
!(isElectron && plugin.cjsUrl) &&
plugin.name
.toLowerCase()
.includes(model.filterText.toLowerCase())
)
})
.map(plugin => (
<PluginCard
Expand Down
16 changes: 9 additions & 7 deletions products/jbrowse-desktop/src/jbrowseConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,15 @@ export default function JBrowseConfigF(
/**
* #slot
* defines plugins of the format
* \{ umdUrl: string, name:string \} |
* \{ url: string, name: string \} |
* \{ esmUrl: string \} |
* \{ cjsUrl: string \} |
* \{ umdLoc: \{ uri: string \} \} |
* \{ esmLoc: \{ uri: string \} \} |
* \{ cjsLoc: \{ uri: string \} \}
* ```typescript
* type PluginDefinition=
* { umdUrl: string, name:string } |
* { url: string, name: string } |
* { esmUrl: string } |
* { cjsUrl: string } |
* { umdLoc: { uri: string } } |
* { esmLoc: { uri: string } } |
* ```
*/
plugins: types.array(types.frozen<PluginDefinition>()),
/**
Expand Down
16 changes: 9 additions & 7 deletions products/jbrowse-web/src/jbrowseConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,15 @@ export default function JBrowseConfigF(
/**
* #slot
* defines plugins of the format
* \{ umdUrl: string, name:string \} |
* \{ url: string, name: string \} |
* \{ esmUrl: string \} |
* \{ cjsUrl: string \} |
* \{ umdLoc: \{ uri: string \} \} |
* \{ esmLoc: \{ uri: string \} \} |
* \{ cjsLoc: \{ uri: string \} \}
* ```typescript
* type PluginDefinition=
* { umdUrl: string, name:string } |
* { url: string, name: string } |
* { esmUrl: string } |
* { cjsUrl: string } |
* { umdLoc: { uri: string } } |
* { esmLoc: { uri: string } } |
* ```
*/
plugins: types.array(types.frozen<PluginDefinition>()),
/**
Expand Down
4 changes: 0 additions & 4 deletions website/blog/2021-11-04-v1.5.1-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ configs on JBrowse Desktop

![](/img/cytobands.png)

<!--
http://localhost:3000/?config=test_data%2Fconfig_demo.json&session=share-TSa1mZhU4h&password=37iWg
-->

This can also appear in SVG exports

![](/img/cytobands_svg.png)
Expand Down
15 changes: 11 additions & 4 deletions website/docs/config/JBrowseDesktopConfiguration.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,17 @@ logoPath: {

#### slot: plugins

defines plugins of the format \{ umdUrl: string, name:string \} | \{ url:
string, name: string \} | \{ esmUrl: string \} | \{ cjsUrl: string \} | \{
umdLoc: \{ uri: string \} \} | \{ esmLoc: \{ uri: string \} \} | \{ cjsLoc: \{
uri: string \} \}
defines plugins of the format

```typescript
type PluginDefinition=
{ umdUrl: string, name:string } |
{ url: string, name: string } |
{ esmUrl: string } |
{ cjsUrl: string } |
{ umdLoc: { uri: string } } |
{ esmLoc: { uri: string } } |
```

```js
plugins: types.array(types.frozen<PluginDefinition>())
Expand Down
15 changes: 11 additions & 4 deletions website/docs/config/JBrowseWebConfiguration.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,17 @@ logoPath: {

#### slot: plugins

defines plugins of the format \{ umdUrl: string, name:string \} | \{ url:
string, name: string \} | \{ esmUrl: string \} | \{ cjsUrl: string \} | \{
umdLoc: \{ uri: string \} \} | \{ esmLoc: \{ uri: string \} \} | \{ cjsLoc: \{
uri: string \} \}
defines plugins of the format

```typescript
type PluginDefinition=
{ umdUrl: string, name:string } |
{ url: string, name: string } |
{ esmUrl: string } |
{ cjsUrl: string } |
{ umdLoc: { uri: string } } |
{ esmLoc: { uri: string } } |
```

```js
plugins: types.array(types.frozen<PluginDefinition>())
Expand Down
50 changes: 28 additions & 22 deletions website/docs/models/LinearGenomeView.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,13 +234,6 @@ any
boolean
```

#### getter: isSearchDialogDisplayed

```js
// type
boolean
```

#### getter: scaleBarHeight

```js
Expand Down Expand Up @@ -379,7 +372,7 @@ BlockSet
#### getter: dynamicBlocks

dynamic blocks represent the exact coordinates of the currently visible genome
regions on the screen. they are similar to static blocks, but statcic blocks can
regions on the screen. they are similar to static blocks, but static blocks can
go offscreen while dynamic blocks represent exactly what is on screen

```js
Expand Down Expand Up @@ -621,7 +614,9 @@ zoomTo: (bpPerPx: number, offset?: number, centerAtOffset?: boolean) => number

#### action: setOffsets

sets offsets used in the get sequence dialog
sets offsets of rubberband, used in the get sequence dialog can call
view.getSelectedRegions(view.leftOffset,view.rightOffset) to compute the
selected regions from the offsets

```js
// type signature
Expand All @@ -632,14 +627,7 @@ setOffsets: (left?: BpOffset, right?: BpOffset) => void

```js
// type signature
setSearchResults: (results?: BaseResult[], query?: string) => void
```

#### action: setGetSequenceDialogOpen

```js
// type signature
setGetSequenceDialogOpen: (open: boolean) => void
setSearchResults: (searchResults: BaseResult[], searchQuery: string, assemblyName?: string) => void
```

#### action: setNewView
Expand Down Expand Up @@ -699,7 +687,7 @@ toggleTrack: (trackId: string) => void

```js
// type signature
setTrackLabels: (setting: "hidden" | "offset" | "overlapping") => void
setTrackLabels: (setting: "offset" | "hidden" | "overlapping") => void
```

#### action: toggleCenterLine
Expand Down Expand Up @@ -820,18 +808,29 @@ moveTo: (start?: BpOffset, end?: BpOffset) => void

#### action: navToLocString

navigate to the given locstring
Navigate to the given locstring, will change displayed regions if needed, and
wait for assemblies to be initialized

```js
// type signature
navToLocString: (locString: string, optAssemblyName?: string) => Promise<void>
navToLocString: (input: string, optAssemblyName?: string) => Promise<any>
```

#### action: navToLocations

Similar to `navToLocString`, but accepts parsed location objects instead of
strings. Will try to perform `setDisplayedRegions` if changing regions

```js
// type signature
navToLocations: (parsedLocStrings: ParsedLocString[], assemblyName?: string) => Promise<void>
```

#### action: navTo

Navigate to a location based on its refName and optionally start, end, and
assemblyName. Can handle if there are multiple displayedRegions from same
refName. Only navigates to a location if it is entirely within a
assemblyName. Will not try to change displayed regions, use `navToLocations`
instead. Only navigates to a location if it is entirely within a
displayedRegion. Navigates to the first matching location encountered.

Throws an error if navigation was unsuccessful
Expand All @@ -843,6 +842,13 @@ navTo: (query: NavLocation) => void

#### action: navToMultiple

Navigate to a location based on its refName and optionally start, end, and
assemblyName. Will not try to change displayed regions, use navToLocations
instead. Only navigates to a location if it is entirely within a
displayedRegion. Navigates to the first matching location encountered.

Throws an error if navigation was unsuccessful

```js
// type signature
navToMultiple: (locations: NavLocation[]) => void
Expand Down
2 changes: 1 addition & 1 deletion website/docs/models/LinearWiggleDisplay.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ boolean

```js
// type
;1 | 0 | 2
;0 | 1 | 2
```

### LinearWiggleDisplay - Methods
Expand Down
8 changes: 4 additions & 4 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
},
"dependencies": {
"@cmfcmf/docusaurus-search-local": "^1.1.0",
"@docusaurus/core": "2.4.0",
"@docusaurus/preset-classic": "2.4.0",
"@docusaurus/core": "0.0.0-5562",
"@docusaurus/preset-classic": "0.0.0-5562",
"@emotion/react": "^11.10.6",
"@emotion/styled": "^11.10.6",
"@mdx-js/react": "^1.0.0",
"@mdx-js/react": "^2.3.0",
"@mui/icons-material": "^5.11.16",
"@mui/material": "^5.12.0",
"acorn": "^8.8.2",
Expand All @@ -36,7 +36,7 @@
"react-player": "^2.12.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.4.0",
"@docusaurus/module-type-aliases": "0.0.0-5562",
"@tsconfig/docusaurus": "^1.0.7",
"typescript": "^5.0.4"
},
Expand Down
Loading