https://github.com/cheminfo/visualizer-on-tabs

Builds a static website that has multiple instances of the visualizer that can communicate with each other

https://github.com/cheminfo/visualizer-on-tabs

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.4%) to scientific vocabulary
Last synced: 9 months ago · JSON representation

Repository

Builds a static website that has multiple instances of the visualizer that can communicate with each other

Basic Info
  • Host: GitHub
  • Owner: cheminfo
  • License: mit
  • Language: JavaScript
  • Default Branch: main
  • Size: 1.65 MB
Statistics
  • Stars: 0
  • Watchers: 5
  • Forks: 2
  • Open Issues: 4
  • Releases: 1
Created over 10 years ago · Last pushed 10 months ago
Metadata Files
Readme License

README.md

visualizer-on-tabs

Builds a static website that has multiple instances of the visualizer that can communicate with each other.

CLI usage

bash npx visualizer-on-tabs --config=./config.json --outDir=./out

Configuration

Example: https://github.com/cheminfo/cheminfo-server-setup/blob/master/doc/on-tabs/config.json

js const config = { // Title of the single page app title: 'My app', // List of default views to load possibleViews: { Home: { url: 'https://couch.cheminfo.org/cheminfo-public/158ef2f0cc85bfc5b4f2d88cff473e83/view.json', }, }, // Rules on how visualizer view URLs should be rewritten when a tab is opened rewriteRules: [ { reg: '^([a-z0-9]+)\\?(.*)$', replace: 'https://couch.cheminfo.org/cheminfo-public/$1/view.json?$2', }, { reg: '^[a-z0-9]+$', replace: 'https://couch.cheminfo.org/cheminfo-public/$&/view.json', }, { reg: '^[a-z0-9]+/view.json\\?.*', replace: 'https://couch.cheminfo.org/cheminfo-public/$&', }, ], // Setting this to true loads all the tabs (in possibleViews) on page load // It is discouraged to do this because loading hidden iframes // lead to layout issues. Especially in Firefox. // When false, only the selected tab is loaded. loadHidden: false, // The visualizer configuration object that will be passed to each visualizer instance visualizerConfig: undefined, // The version of the visualizer to load. By default it 'auto', which uses // the version stored in the loaded view. visualizerVersion: 'auto', // Options passed to `makeVisualizerPage`, see https://github.com/cheminfo/react-visualizer // Respectively `fallbackVersion` and `cdn`. visualizerFallbackVersion: undefined, visualizerCDN: undefined, };

Dev setup

Here is how you can test your changes in the visualizer-on-tabs react app.

Build the page with a custom configuration

There is a dev configuration in ./dev.json, which is used by local scripts to build a working visualizer-on-tabs app.

To build in dev mode with automatic rebuild, run:

bash npm run build:dev

To test the production build, run:

bash npm run build

To serve the files produced by the build, run:

bash npm run serve

Install and configure visualizer-on-tabs

Configure a flavor to deploy on-tabs

Edit the flavorLayouts(/usr/local/flavor-builder/config.json) to specify a deployment method for your flavor. For this, you need to add a new entry which key is your flavor name and value is visualizer-on-tabs. Example:

... "flavorLayouts": { "720p": "minimal-simple-menu", "myflavor":"visualizer-on-tabs" } ...

Add a new rewriteRule

"visualizerOnTabs": { "_default": { "rocLogin": { "url": "https://myloginserver" }, "rewriteRules": [ {"reg": "^[^/]+$", "replace": "http://myserver.org/rest-on-couch/db/visualizer/$&/view.json"} ] } ...

You would need to edit a view in this flavor, or launch the build manually with the --forceUpdate option.

Owner

  • Name: Cheminfo
  • Login: cheminfo
  • Kind: organization

GitHub Events

Total
  • Release event: 1
  • Issue comment event: 5
  • Push event: 14
  • Pull request review event: 4
  • Pull request review comment event: 3
  • Pull request event: 7
  • Create event: 3
Last Year
  • Release event: 1
  • Issue comment event: 5
  • Push event: 14
  • Pull request review event: 4
  • Pull request review comment event: 3
  • Pull request event: 7
  • Create event: 3

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 9
  • Total pull requests: 46
  • Average time to close issues: 4 months
  • Average time to close pull requests: about 1 year
  • Total issue authors: 3
  • Total pull request authors: 5
  • Average comments per issue: 0.89
  • Average comments per pull request: 0.54
  • Merged pull requests: 20
  • Bot issues: 0
  • Bot pull requests: 36
Past Year
  • Issues: 0
  • Pull requests: 3
  • Average time to close issues: N/A
  • Average time to close pull requests: about 1 hour
  • Issue authors: 0
  • Pull request authors: 2
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • stropitek (3)
  • targos (3)
  • lpatiny (3)
Pull Request Authors
  • dependabot[bot] (36)
  • stropitek (6)
  • targos (2)
  • cheminfo-bot (1)
  • bjonnh (1)
Top Labels
Issue Labels
bug (4)
Pull Request Labels
dependencies (36) autorelease: pending (1)

Dependencies

package-lock.json npm
  • 867 dependencies
package.json npm
  • babel-eslint ^10.0.1 development
  • eslint ^5.12.0 development
  • eslint-config-cheminfo ^1.20.0 development
  • eslint-config-neptune-react ^2.6.0 development
  • eslint-plugin-import ^2.14.0 development
  • eslint-plugin-jest ^22.1.3 development
  • eslint-plugin-react ^7.12.4 development
  • jest ^23.6.0 development
  • shx ^0.3.2 development
  • @babel/core ^7.2.2
  • @babel/plugin-transform-async-to-generator ^7.2.0
  • @babel/plugin-transform-modules-commonjs ^7.2.0
  • @babel/plugin-transform-regenerator ^7.0.0
  • @babel/plugin-transform-runtime ^7.2.0
  • @babel/preset-env ^7.2.3
  • @babel/preset-react ^7.0.0
  • @babel/runtime ^7.2.0
  • babel-loader ^8.0.5
  • bootstrap ^4.2.1
  • fs-extra ^7.0.1
  • iframe-bridge ^1.1.0
  • js-yaml ^3.12.1
  • lockr ^0.8.5
  • lodash ^4.17.21
  • minimist ^1.2.6
  • on-build-webpack ^0.1.0
  • react ^16.7.0
  • react-bootstrap ^0.32.4
  • react-dom ^16.7.0
  • react-visualizer ^2.1.2
  • superagent ^4.1.0
  • webpack ^4.28.4