Skip to main content

Upgrading to v1

Previous versions of the Gene Ontology Web Components were managed as separate packages. Starting with v1 of this package, all components are now bundled together in a single package. This simplifies installation and usage, allowing you to import all components from a single package instead of managing multiple dependencies.

Updating Dependencies

Previously, you may have had one or more of the following packages installed:

  • @geneontology/wc-gocam-viz
  • @geneontology/wc-go-ribbon
  • @geneontology/wc-ribbon-strips
  • @geneontology/wc-ribbon-table

To upgrade to v1, you should remove these packages and install the new unified package: @geneontology/web-components. See the installation guide for more details.

New Custom Element Names

In v1, the custom element names have been standardized to follow a consistent naming convention. Replace the following old custom element names with the new ones:

Previous Element NameNew Element Name
wc-gocam-vizgo-gocam-viewer
wc-gocam-legendgo-gocam-viewer-legend
wc-go-ribbongo-annotation-ribbon
wc-ribbon-stripsgo-annotation-ribbon-strips
wc-ribbon-tablego-annotation-ribbon-table

Annotation Ribbon API Changes

The go-annotation-ribbon component has undergone several API changes. Some attributes have been renamed, modified, or removed. Below is a summary of the changes:

Previous Attribute NameNew Attribute/Migration Path
add-cell-allRenamed show-all-annotations-group.
annotation-labelsRemoved, no longer configurable.
base-api-urlRenamed ribbon-data-api-endpoint.
category-all-styleReplaced by --group-all-font-weight CSS custom property.
category-caseReplaced by --group-text-transform CSS custom property.
category-other-styleReplaced by --group-other-font-weight CSS custom property.
class-labelsRemoved, no longer configurable.
color-byNow accepts strings ("annotations" or "classes") instead of integers (0 or 1).
dataRemoved, use setData() method instead.
exclude-p-bRenamed exclude-protein-binding.
fire-event-on-empty-cellsRemoved, previously had inconsistent behavior.
group-base-urlRemoved, previously unimplemented.
group-new-tabRemoved, previously unimplemented.
max-colorPreviously accepted a string that was implicitly an RGB triple (e.g. "255,0,0" for red). Now accepts a CSS color string. Existing usage can be migrated by wrapping the string in rgb() (e.g. "rgb(255,0,0)" for red).
max-heat-levelRenamed max-color-level. This property now directly determines at which number of classes or annotations the max-color is applied. It also now allows the value 0 (the default) to indicate that the value should be automatically determined from the data.
min-colorPreviously accepted a string that was implicitly an RGB triple (e.g. "255,0,0" for red). Now accepts a CSS color string. Existing usage can be migrated by wrapping the string in rgb() (e.g. "rgb(255,0,0)" for red).
selection-modeNow accepts strings ("cell" or "column") instead of integers (0 or 1).
subject-positionNow accepts strings ("none", "left" or "right") instead of integers (0, 1 or 2). The "bottom" option (3) was removed because it was previously unimplemented.
subject-use-taxon-iconRemoved, previously unimplemented.