Skip to content

Commit

Permalink
Conf->config
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Oct 15, 2022
1 parent a0677df commit f42e908
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 17 deletions.
4 changes: 2 additions & 2 deletions packages/core/BaseFeatureWidget/BaseFeatureDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -572,11 +572,11 @@ export const FeatureDetails = (props: {
const { pluginManager } = getEnv(model)
const session = getSession(model)

const ExtraPanel = pluginManager.evaluateExtensionPoint(
const ExtraPanel = pluginManager?.evaluateExtensionPoint(
'Core-extraFeaturePanel',
null,
{ session, feature, model },
) as { name: string; Component: React.FC<any> }
) as { name: string; Component: React.FC<any> } | undefined
return (
<BaseCard title={generateTitle(name, id, type)}>
<Typography>Core details</Typography>
Expand Down
4 changes: 2 additions & 2 deletions packages/core/pluggableElementTypes/models/baseTrackConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ export function createBaseTrackConfig(pluginManager: PluginManager) {
},
}),
formatAbout: ConfigurationSchema('FormatAbout', {
conf: {
config: {
type: 'frozen',
description: 'formats configuration object in about dialog',
defaultValue: {},
contextVariable: ['conf'],
contextVariable: ['config'],
},
hideUris: {
type: 'boolean',
Expand Down
4 changes: 2 additions & 2 deletions plugins/sequence/src/ReferenceSequenceTrack/configSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ export function createReferenceSeqTrackConfig(pluginManager: PluginManager) {
},

formatAbout: ConfigurationSchema('FormatAbout', {
conf: {
config: {
type: 'frozen',
description: 'formats configuration in about dialog',
defaultValue: {},
contextVariable: ['conf'],
contextVariable: ['config'],
},
hideUris: {
type: 'boolean',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ export default function createConfigModel(
},
}),
formatAbout: ConfigurationSchema('FormatAbout', {
conf: {
config: {
type: 'frozen',
description: 'formats configuration object in about dialog',
defaultValue: {},
contextVariable: ['conf'],
contextVariable: ['config'],
},
hideUris: {
type: 'boolean',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ export default function createConfigModel(
},
}),
formatAbout: ConfigurationSchema('FormatAbout', {
conf: {
config: {
type: 'frozen',
description: 'formats configuration object in about dialog',
defaultValue: {},
contextVariable: ['conf'],
contextVariable: ['config'],
},
hideUris: {
type: 'boolean',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ Object {
},
],
"formatAbout": Object {
"config": "jexl:{extraField:'important data'}",
"hideUris": true,
},
"metadata": Object {
Expand Down
14 changes: 7 additions & 7 deletions website/docs/api_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ used to extend the session model itself with new features

type: synchronous

- `conf: Record<string,unknown>` - a snapshot of a configuration object that is
- `config: Record<string,unknown>` - a snapshot of a configuration object that is
displayed in the about dialog

### TrackSelector-multiTrackMenuItems
Expand Down Expand Up @@ -503,10 +503,10 @@ pluginManager.addToExtensionPoint(

### Extension point footnote

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.
Users that want to add further extension points can do so, by simply calling
`pluginManager.evaluateExtensionPoint('YourCustomNameHere', args1, args2). Then, any code that had used `pluginManager.addToExtensionPoint('YourCustomNameHere', ...) will receive be
evaluated.

```
```
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.

0 comments on commit f42e908

Please sign in to comment.