GithubHelp home page GithubHelp logo

isabella232 / plugin-ui Goto Github PK

View Code? Open in Web Editor NEW

This project forked from grafana/plugin-ui

0.0 0.0 0.0 1.82 MB

React components for Grafana plugins

TypeScript 98.22% JavaScript 1.46% CSS 0.32%

plugin-ui's Introduction

plugin-ui

React components for Grafana plugins

Compatibility

There are situations when we require backwards compatibility with core Grafana and new features are only supported by newer versions.

To handle this, we've introduced the compatibility.ts file which contains a list of features and the versions they support for better maintainability.

Considerations

The way we are currently checking whether a feature is supported is by using the Grafana's BuildInfo.

However, there are cases when this version may be masked from plugins.

Only anonymous users (with read-only access) will be able to have their versions hidden, so this should be taken into consideration when deciding whether we should be adding a new feature to our compatibility list.

Unreleased Components

Sometimes we may want improvements/updates of @grafana/ui components but we don't want to update the minimum required versions of Grafana in our plugins and continue supporting older versions.

To work around this, we can import and export the version of the component we want from @grafana/ui in this project. Plugins can then use the component exported from here rather than @grafana/ui.

If updates to a component in @grafana/ui are available in master but not a Grafana release yet, we can copy the components directly into unreleasedComponents to be used in plugins.

Alternatively, we could use the @grafana/ui: canary version instead. However, there are the following tradeoffs:

  • Multiple canary versions will be released in-between @grafana/ui releases

    • This means in-between these release cycles where the component changes aren't available in a package version, the yarn.lock file will need to be updated for every change we make in this project
  • canary versions include @grafana/ui: master branch

    • This means component changes in the master branch which aren't scheduled for the next major release will be included in the canary package.
    • For example, we have changes in <ComponentA /> that won't be released until v7.5.x and <ComponentB /> has changes which are intended to be released for v7.6. Using canary of @grafana/ui will expose the <ComponentB /> major updates too, which we do not want.

Once a @grafana/ui package is then released and available with the component updates, we can remove the component from this folder and export the imported version from the new @grafana/ui package instead.

This means any component in unreleasedComponents should not be modified - they should stay in sync with what is in @grafana/ui (besides changes in imports or stories) and removed from this project as soon as we can replace it with an actual package version.

Storybook

yarn storybook

plugin-ui's People

Contributors

vickyyyyyyy avatar srclosson avatar kminehart avatar yesoreyeram avatar masslessparticle avatar scottlepp avatar

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.