Giter Site home page Giter Site logo

gnomad-browser-toolkit's Introduction

gnomAD Browser Toolkit

A collection of reusable components and tools for building genomic data browsers.

gnomad-browser-toolkit's People

Contributors

dependabot[bot] avatar huy-nguyen avatar knguyen142 avatar mattsolo1 avatar mwoodbri avatar nawatts avatar phildarnowsky-broad avatar sjahl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gnomad-browser-toolkit's Issues

Remove feature type from region viewer regions

RegionViewer currently requires a feature_type property on regions.

feature_type: PropTypes.string.isRequired,

However, it isn't used by RegionViewer.

Remove the requirement and implement padding by extending passed regions instead of adding additional padding regions. Better yet, as long as we're making a breaking change, remove padding entirely from RegionViewer and leave that to consumers.

Check if Unicode property escapes are supported for identifiers

Currently, identifiers regular expressions use a Unicode property escape if the Unicode flag is supported by the browser.

const DASH = isRegExpUnicodeFlagSupported ? '\\p{Pd}' : '-'

However, the Unicode flag is more broadly supported than Unicode property escapes.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#browser_compatibility

We should test if Unicode property escapes are supported.

Migrate GBTK to Typescript

Currently, the gnomAD Browser Toolkit (GBTK) package is written in JavaScript.

It would be preferable to migrate this package to TypeScript to be in line with what is happening with the gnomAD browser, and to gain the benefits of static typing.

Remove resources imports

A few examples import data from an unpublished "resources" folder. These should be replaced with fixtures checked into the repository, randomly generated data, or data fetched from the gnomAD API.

Once that is done, configuration related to resources can be removed from .eslintrc.js, babel.config.js, and .gitignore.

Yarn v2 migration road map

  • Remove selective version resolution for @types/react in the top-level package.json and confirm that type checking still succeeds.
  • Make sure ESLint + Prettier works for both JS and TS code.

Release region viewer update

#48 made breaking changes to region-viewer. When that is released, all track packages will also have to be updated to allow region-viewer version 1 or 2 in peer dependencies.

Deprecated lifecycle methods

A few components in the ui package have dependencies that use deprecated lifecycle methods.

  • Combobox and Searchbox use react-autocomplete. react-autocomplete is no longer maintained (the repository is archived) and will need to be replaced.

  • Tabs uses react-aria-tabpanel. react-aria-tabpanel is seeking new maintainers but has not been updated in the past year.

Avoid creating a container element for each tooltip

Currently, the TooltipAnchor component attaches a container element to the body and render its tooltip into that container.

constructor(props) {
super(props)
this.containerElement = document.createElement('div')
}
componentDidMount() {
document.body.appendChild(this.containerElement)
}
componentWillUnmount() {
document.body.removeChild(this.containerElement)
}

This affects performance when rendering many elements with tooltips, such as some plots. Preferably, all tooltip anchors could share one container.

Migrate to pnpm

Related: #8

Currently, this repo uses Yarn as the package manager, rather than migrating to Yarn v2, which many users seem to dislike, it was suggested to migrate to pnpm, if we are to migrate.

Migrate GBTK to TypeScript

Placeholder issue created during browser meeting, will be closed as duplicate on more thorough inspection if needed.

Add types to UI package

The gnomad-browser has migrated to TypeScript. It makes sense for the Toolkit to follow, and to add types for all of its components in the ui package, so that any Frontend application using these ui components can use this packages types.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.