GithubHelp home page GithubHelp logo

quantmind / d3-view Goto Github PK

View Code? Open in Web Editor NEW
13.0 5.0 1.0 1.71 MB

d3 plugin for :sunny: web interfaces

License: BSD 3-Clause "New" or "Revised" License

JavaScript 98.43% Shell 0.15% HTML 1.18% CSS 0.14% Makefile 0.10%
d3 ui viewcontroller reactive d3js d3-module form forms bootstrap4 modal

d3-view's People

Contributors

lsbardel avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

quantrocket

d3-view's Issues

Allow to specify mounted callback on DOM

An idea is to specify the mounted callback for a component directly in the dom.

<my-domponent mounted="$callback"></my-component>

and in javascript

vm = d3.view({
    model: {
        $callback: function (cm) {...}
    }
});

In this way one could organise the view model as the application object.

Better algorithm for isDirty in forms

When the $isValid() form method is called, even if it wasn't called by a submit, it marks the form as dirty, i.e. as it was submitted.
This behaviour should be handled by the $setSubmit() method.

javascript API for view-require

Currently the bin/src code builds the view-require command. It would be useful to have a javascript API too which the command uses.

d3-for to use merge

Currently the d3-for directive only use the enter method for creating element in the loop.
We should use the selection merge method to merge the enter and update selection after a data-join.

Export viewSelect

Export viewSelect which accept selectors, html element and d3-selection.

Remove viewMount

Remove viewMount function exported by src/mount.js
Not sure why we still need the function

Directive issue or bug

Using a directive with the following expression in a for loop directive (with tab being the for-loop item)

d3-active='$active(tab.href, currentUrl)'

where the currentUrl is a reactive property of the parent element, it fails to update on currentUrl changes. This could be caused by the for loop or not.
This looks like an bug with d3-view unfortunately.

flux like store

Investigate the possibility of adding a flux like store to the root view.
The root view is in effect a store, we may want to formalize that?

Firefox issue in CI v 2

Firefox tests are switched off since we started building in circleci version 2.
Firefox bundled with circleci images is too old and fails tests.
Updating to the new firefox as we did in circleci version 1 does not work because the browser does not start for some bizarre reasons.

Ability to return strings

Add the ability to return strings from the component render function.

function mycomponent () {
    return (`
        <p>simple example</p>
    `);
}

directive binding refactoring

The binding algorithm in directive needs to be refactored to account for

  • child model binding
  • model's functions binding

Required field example

Add an example on how to handle the required field with bootstrap plugin (the plugin adds the form-control-required class to the element).

remove prototype inheritance in model?

Not sure the inheritance between parent and child is needed.
One alternative is to specify attributes which are going to be inherited (passed on to the children).

Proposal

  • remove the $child method (prototype inheritance)
  • the $new pass models attributes only to the child model

phantomJS test issue

PhantomJS tests fail, currently switched off in Circle CI.
Only one test is problematic but difficult to fix

require method in components

Add the require methods to component and a centralised library resource for requiring new module in the browser.

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.