Giter VIP home page Giter VIP logo

uchibeke / composer-form Goto Github PK

View Code? Open in Web Editor NEW
6.0 5.0 9.0 774 KB

A modeling tool for generating a web form from a blockchain model type and validating and submitting the filled out form to a Hyperledger Blockchain

Home Page: https://hyperledger.github.io/composer/

License: Other

HTML 3.03% CSS 2.45% JavaScript 94.53%
blockchain hyperledger-composer-model modeling-language hyperledger hyperledger-fabric diagram-editor hyperledger-composer hyperledger-setup

composer-form's People

Contributors

uchibeke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

mttrbrts tkuhrt

composer-form's Issues

Localization

Add localization.

Dan

It would be very useful to be able to decorate the Composer model with annotations that are used as the labels for the generated form. See accordproject/template-archive#111. Additional annotations could be defined for accessibility, keyboard navigation etc.

Form generation from local model file

  • From a free-textarea or similar, the user should be able to provide text by copy / paste as the source for the generator.
  • The source model should be validate before form generation
  • Errors in the source model should be visualized in the UI.

Form is generated multiple times

To reproduce paste this contents:

namespace org.accordproject.address

/**
 * Based on http://schema.org/PostalAddress
 */
concept Foo {
  o String streetAddress optional
  o String postalCode optional
  o String postOfficeBoxNumber optional
  o String addressRegion optional
  o String addressLocality optional
  o String addressCountry optional
}

There are 3 instances of Foo generated.

Support for nested models

Enums, Relationships, and Concepts should be handled and built into the form generator.

  • We will support up to 3 levels of nesting

Support for model selection from model file

When generating a form from a model file that contains multiple models, I should be able to select which of the models that I want to render:

  • I should be able to make the selection programmatically
  • I should be able to make the selection in the UI

Publish to NPM

I should be able to install the composer-form libraries from NPM so that I can use them in a project

Generation of Model Instances from Form contents

On a button click or function call, the contents of a valid form should generate a JSON serialization.

Parsing this JSON serialization with the Model Manager's Serializer (fromJSON) should be guaranteed to succeed.

Questions

  • What does it mean for a form to be valid?
  • How do you handle / present errors in the serialization process?

Use mono repo for managing components

Three components

  • The main form generator tool (Reusable and generic)
  • React form generator and
  • Vanilla JS version

Setup code repo with lerna and start working on the generic form generator

Setup CI and testing

Matt:

Let’s talk about CI/CD later today. AP and Composer both use travis for builds, mocha/chai for tests, and coveralls for test coverage

If we’re in GitHub land, using a GH project associated with your repo is probably sufficient. You could create a kanban board to organise your tasks and issues into milestones

Accept user input in the form and validate against model

Dan:

A cool demo would be a React app that: (edited)

1. Prompt the user for the the fully-qualified name of a CML type and a URL to import the type from
2. Generate the web form dynamically from the type
3. User populates the web form
4. The JSON is displayed and validated against the mode

Custom Styling

As a user of this library, I should be able to apply custom styling to the generated code so that it fits within the context of my application.

Browserify the package

So that I can run the generator client-side, the packages should be browserified. This includes dependencies such as composer-common

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.