Giter Site home page Giter Site logo

kbc-ui's Introduction

Keboola Connection UI Build Status

User interface for Keboola Connection

Development

  • Clone the repo
  • Install dependencies npm install
  • Server, watch and test with live reload npm start
  • Open this url in your browser http://localhost:3000/?token=YOUR_STORAGE_API_TOKEN

Application will be opened in your browser and will be hot reloaded after each change in source files.

Running in Docker

docker-compose run --rm --service-ports dev # runs npm install && npm start

Build dist package

  • npm run build (It is executed by Travis after each push)

Application Architecture

  • Single page application running in browser data fetching from Keboola REST APIs.
  • Written in ES2015 (ES6) compiled to JS using Babel (older parts are written in Coffeescript).
  • Bundled by Webpack.
  • View layer is composed by React components
  • Flux Architecture with unidirectional data flow controlling whole application. Vanilla Flux implementation is used.
  • React Router for routing
  • Keboola Bootstrap for UI components style. It is based on Twitter Bootstrap

React Components Best Practices

  • It has to be pure it means rendered result is dependent only on components props and state. PureRenderer mixin can be then utilized
  • Component props and state should be Immutable structures
  • Define Prop Types form component. It is validated in development runtime and also in build step using ESlint
  • Separate component which involves some data fetching to container components holding the fetched state and simple component rendering the data received using props. Read more about this pattern
    • Most of component should be "dumb" only with props, these are easiest to understand and most reusabled. Only top level components and container component should be connected to Flux stores. state can be of course used for things like open modal or acccordion status or temporary edit values in modal.
    • If you want to enhance component behaviour or inject some data consider using High Order Components It allows great composability using functions.

UX Guidelines

  • Try to reuse components from KBC Bootstrap
  • Provide instant feedback for all actions.
  • Provide confirmation and explanation for possibly destructive actions (delete configuration, run job)
  • UI should be self explainable and it should guide you to required actions. e.q. Database extractor configuration flow.
  • Data fetching
    • Render the page when the primary data are available.
    • Some additionally data can be fetched later, loader should be shown when data are not yet loaded.

HOW TO

Add assets

Whole application is bundled by Webpack, not just js and coffee script files but also stylesheets (less, css), media and image files. Assets should be loaded by require or import function.

Examples:

Add New Component (extractor, writer or application)

kbc-ui's People

Contributors

kacurez avatar halama avatar ondrejhlavacek avatar ujovlado avatar erikzigo avatar jakubmatejka avatar radektomasek avatar odinuv avatar mirocillik avatar pivnicek avatar padak avatar

Watchers

David Schovanec avatar James Cloos 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.