Code Monkey home page Code Monkey logo

im-tables's Introduction

InterMine Results Tables

A data display library for InterMine web-applications.

This library provides a highly functional data exploration and download tool suitable for embedding into any website. It requires an InterMine data-warehouse to communicate with for data, and a modern web-browser (IE 10+).

This library is free and open source software, licensed under the LGPL-v3 licence. A copy of this license is distributed with this repository.

Synopsis

    var imtables = require('im-tables');

    var element = document.querySelector('#my-id');
    var service = {root: 'http://www.flymine.org/query/service'};
    var query = {
        select: ['*'],
        from: 'Gene',
        where: [['Gene', 'IN', 'MY-LIST']]
    };

    // Configure options here, using nested notation
    imtables.configure({TableCell: {PreviewTrigger: 'click'}});
    // Or using path names:
    imtables.configure('TableResults.CacheFactor', 20);

    // Then load the table (or indeed vice-versa, the table
    // will respond to changes in the options)
    imtables.loadTable(
        element, // Could also be a string or a jquery object
        {start: 0, size: 25}, // Can be null - all properties are optional.
        {service: service, query: query} // Can also be an imjs.Query object
    ).then(
        function handleTable (table) { /* ... Do something with the table. */ },
        function reportError (error) { console.error('Could not load table', error); }
    );

Installation and Usage

This library is developed with Browserify and provides a UMD (Universal Module Definition) interface to its main entry point. It can thus be loaded as a commonjs module, from an AMD loader or as a window global. We recommend using npm and browserify:

  npm install --save im-tables

Then in your code:

  var imtables = require('im-tables');

Issues & Support

For help and support, the developers may be contacted at:

http://intermine.org/contact/

For a public bug tracker, please visit the github issues tracker:

https://github.com/intermine/im-tables/issues

Customisation

This library is designed to be customised by end users, in every aspect from its stylesheets and text strings, to the code that defines the behaviour of individual components. Please see the file CUSTOMISING for details on how to get started.

Development

Please see the CONTRIBUTING file included in this distribution for details of how to start developing this library.

Acknowledgements

The development work for this library was funded by the NIH and the Wellcome Trust as part of the InterMOD model organism datamine project. It is one of the constituent components of the InterMine data-warehouse system.

This set of user interface tools would not be possible without the fantastic set of open source web development tools available today. We are extremely grateful to benefit from the hard work put into the development of:

  • Backbone
  • Bootstrap
  • Browserify
  • CoffeeScript
  • d3
  • FontAwesome
  • jQuery & jQuery.UI
  • underscore

Copyright

The copyright on this work is held by Alex Kalderimis, InterMine, and all other authors who have contributed to this repository.

im-tables's People

Contributors

alexkalderimis avatar amand1996 avatar asherpasha avatar codhek avatar dhruvi16 avatar firshta2016 avatar heralden avatar joshkh avatar jshreyans avatar lakshsingla avatar manasa2850 avatar nikhil-vats avatar solace1987 avatar yochannah avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

im-tables's Issues

Results Cells: Question

If the cell represents a composite value then it should not appear fundamentally different from the other cell types.

Can we have an example of a composite value field? Especially since they should not appear fundamentally differently.

Adding a new filter though main filter box

Once you have defined your filter there are two options 'Add Filter' at the bottom right and 'Apply' right underneath. Only 'Apply' works, but I didn't see this box first time through - I automatically clicked 'Add filter'.

[Also, first time I did this there was another box by the 'Apply' button with a 'within' label. This seems to have disappeared now].

Create list fails with exception to illegal characters in Tags

Created a list of exons and selected one of the suggested Tags (based on one of my Filters):

symbol ONE OF yuri,Sam-S,Nhe3,Gpd [ --- all gene names listed on mouse over]

Throws an error:

Failure
Invalid name. Names may only contain letters, numbers, spaces, full stops, hyphens and colons.

remember user's preferred formats

the tables should at least offer to remember the user's preferred formats between sessions. This is particularly the case for:

  • Export formats
  • Code generation formats

List Management: draggable improvement

The user should be able to move this dialogue around

Would be an improvement if one could move the dialog box by dragging on the grey part and not just part of the modal-header?

Export dialogue is cluttered

There is too much stuff in one place, and the separation between what to export, and where to export it, is far from clear.

This can be ameliorated by moving to a wizard interface, with a carousel between definition of content and what to do with that content.

Single color vs gradient in IE9

It seems that the onhover background color for say adding tags interface presents itself as a gradient from dark blue to black, while in Opera and Chrome it is single color light blue.

If someone wanted to theme their Results Table, would/could both colors be the same?

Reverse reference leaves box if clicked on.

A minor issue as I doubt many would do this: if you click on a reverse reference in the column management it leaves the little box, eg 'Refers back to gene' and you can't get rid of it.

List Management: placeholder color

The placeholder and normal text color in input boxes is too similar. I am not sure that Description will not be saved as while say Name is prefilled with text, Description is not.

Screenshot - 260313 - 12:11:43

Remove dependency on bootstrap

It should be possible to get by without bootstrap. The table structure is pretty solid now
and is unlikely to see major changes, so the benefit brought by a rapid prototyping library
are now minimal, and the need to produce a custom set of css hackery is getting in the way of integration.

Needs spec listing

We need a formal specification of what behaviour is expected from the tables.

Generated URIs can easily break URI length limits for browsers.

This breaks downloading, probably code generation as well. Several things:

  • Dropdown filter selections should use NONE OF where it would make things smaller.
  • Code generation should use post for display.
  • We should use the openWindowWithPost hack when the URI gets too large.

Replace scope machinery with require system

The scope machinery works, but is a) a bit hacky, and b) forces any shared code to be public. It should be possible to replace this system with an injected module registry and a require mechanism, into which the code is wrapped at compile time, much the way it is now.

eg:

  class Registry
    _registry_ = {}

    resolve = (obj, path, vivify) ->
      parts = path.split /\./
      while part = parts.shift()
        obj = obj?[part] ? vivify and obj[part] = {}
      obj

    register: (path, mapping) ->
      obj = resolve _registry_, path, true
      for k, v of mapping
        obj[k] = v

    export: (path) ->
      obj = @require path
      throw new Error("Noting to export: #{ path }") unless obj
      dest = resolve window, path, true
      dest[k] = v for k, v of obj

    require: (path) ->
      obj = resolve _registry_,  path, false
      throw new Error("Noting to export: #{ path }") unless obj
      _.extend {}, obj # Don't allow the caller to mutate the object?

  registry = new Registry
  # Then for each code block:

  do ->
   exports = {}
   # ideally this could be autogenerated from the filename, eg
   __SCOPE__ = 'column-header'

   # CODE GOES HERE

   registry.register __SCOPE__, exports

  registry.export 'intermine'

It would be really nice to try and order the code blocks
by dependencies at build time.

Column confusion..

I am not sure how the chromosome location column was created but it causes confusion for the column selection under 'Create /Add to list'. This shows 'The chromosome from column 3' which doesn't exist and consequently the column numbers for the subsequent columns are wrong.

Create a list link

There is no longer a link to a new list once it has been created.
[Minor point: box giving details of new list is overlapped a bit by the column icons].

List Management: checkbox misaligned

in Opera and IE9 it seems to be at the bottom and in Chrome at a baseline.

vertical-align:top on the checkbox seems to have fixed it in Chrome

Screenshot - 260313 - 12:15:23

Result Cells: Subtable links pixel precision

When a subtable has a value that breaks a line (in red), there is only a few (5px) of space to click if I want to get a preview box instead of visiting a Report page.

Perhaps collapse the blue border (in blue) and increase the padding of the inner <td/> (in yellow)?

Screenshot - 260313 - 11:52:03

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.