Giter Site home page Giter Site logo

onezoom / oztree Goto Github PK

View Code? Open in Web Editor NEW
81.0 81.0 16.0 296.97 MB

OneZoom Tree of Life Explorer

License: Other

JavaScript 40.72% R 0.02% Python 5.45% Perl 0.22% HTML 50.70% C 0.31% CSS 0.28% Jupyter Notebook 1.12% SCSS 1.12% Shell 0.05% Dockerfile 0.01%
biodiversity biodiversity-informatics conservation

oztree's People

Contributors

davidebbo avatar dependabot[bot] avatar hyanwong avatar jrosindell avatar kz12 avatar lentinj avatar wolfmanstout avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

oztree's Issues

Simple online/offline switch for museum display

For museum displays that do not have internet connections, we should have a simple config parameter that switches off e.g. the wikipedia popup tab (we could potentially leave the sponsorship tab, which could show simply a url and QR code, but not an "email me" box), and checks that the installation has a local copy of all the thumbnails available.

superflous files

There are some static html files in static/OZSite/ (iframe_load.html, About_this_tree.html, & Sources.html). I think we can probably delete these.

enhanced polytomy view and add view to menu

I want to tweak the polytomy view, especially to solve performance issues and appearance where there are very large polytomies, also the polytomy view should be added to the main menu if we want to offer it as an option. The current view looks like:
screen shot 2018-01-12 at 17 04 50

Is it confusing to not have some tabs some of the time?

E.g. if there is no wikipedia page for a species, should we put up a wikipedia tab which simply says "sorry, there is no wikipedia page for this taxon". Or is it better as we have it, where we don't show the tab if we have no data?

This was picked up as an oddity by one user, but others might find it weirder to have a "no information available" page.

Museum display user accessibility

The museum display needs to feel easy to use for an unexperienced user. One way is by implementing #18, but we also need to take account of:

1.) The current UI relies on mouseover to show what all the small icons do. Mouseover is not useful on a touchscreen (no mouse). All icons should be large and have an obvious function - for example, rather than mouseover hints, we could include as part of them enough text to make the function clear. An example of this is the compass which shows where you are but at the top level of the tree only shows all life and so the point of it is not clear.

2.) It needs to be obvious to the user from the start what the display is showing (tree of life etc etc.) and what they can do with it (search, common ancestor, back to start, etc etc)

Would like to understand & modify get_my_location() to return richness of current node

I don't understand how get_my_location() in controller_loc.js works. It need modifying to give the richness of the current location (even if that location is not named).

Question: why can't we use something like get_largest_visible_node() from record.js to get the current location, then move up the parent chain to the root, rather than the complex recursive call to get_location3() that is currently being used.

Touchscreen issues #1: Search radically slows down UI

Typing a general search such as "dodo" radically slows down the whole UI on James' touchscreen. We should check indexes are properly set on the DB, but I don't think this is the root of the problems as there are problems even when the server is running on another computer. It may be to do with returning too many results into the search box (possibly linked to #6)

Copyright symbol on nodes is not always filled out with text

We try to get the licence etc information from data_repo on line 448 of midnode.js (data_repo.metadata.leaf_meta[code][credit]), but this is often not filled out yet, because of how collect_nodes_need_image_details() works (function in api/image_details.js).

Ideally we either want to get credit information for all images within shown nodes (perhaps a bit intensive), or as we zoom in to a node, and the 4x2 image array appears, we want to add the internal images to collect_nodes_need_image_details()

I think this is possibly a question for @kz12, what do you think, @jrosindell ?

Also return image ids when calling onezoom.utils.process_taxon_list

At the moment the popular species tab is populated using a onezoom JS-API call named onezoom.utils.process_taxon_list, passing in a list of OTTs and a callback function - the callback is processed for each OTT in turn, with common name, node id etc returned. This API function (in src/api/process_taxon_list.js) needs to be adjusted so that images are also returned to the callback function.

Create a "terms.load" file

Similarly to about.load / about.html, and data_sources.load/data_sources.html, we should create a terms.load file which is loaded into terms.html.

Provide a script to download photos

For museums etc we need a way to populate the pics dir so that the OneZoom instance is completely stand-alone, and will work without an internet connection (NB: this will still not allow the display of external pages such as wikipedia, though).

We cannot do this over ssh/rsync. Instead, we probably want a python script that looks up the image IDs from the database table and downloads them over http if they are missing from the pics directory (or if their updated time in the eol_updated table is more recent than the created time on an existing picture)

mobile device touch issues on search

lots of the functions require two taps because the first tap triggers mouse over text to appear only and gives user a short window of time to tap again and perform the action. I think the action should be performed on the first tap

Check museum display view is reasonably "sandboxed"

Before marketing the museum display, we need to make sure that it is reasonably "sandboxed", in that there is no way to navigate to a page or popup that has an external link in it. Perhaps this could be done in an automated manner, using some sort of web crawler? This includes some of the internal OneZoom website pages.

At the moment this is done by using a get request with nolinks=1 set which
(a) redefines the A handler in internal web2py pages, where appropriate (e.g. in about.load, sponsor_node_price.load, etc.)
(b) flags the wikipedia-loading code (which gets wikipedia pages using their REST API) to remove tags that link out to external websites, but keeping internal links within a page (see function sanitise_links() in treeLayout.html: these include BASE, A, and tags with href=xxx, such as AREA - question: are any more needed?)
(c) turns off the ability to right click for context menus, so that we can't e.g. visit the source of an image by right clicking.
(d) Others??? List here.

Should we use the existing compass or another icon for "current location"

I'm wondering if something like img_547364 is more useful (or with a rounded back end like https://www.shutterstock.com/image-vector/vector-current-location-map-marker-arrow-279362993). Alternatives might be a pointer with no circle, a hand, or perhaps a location item in front of a globe.

A google image search for current location icon is possibly useful, and https://www.shutterstock.com/image-vector/compass-icons-on-white-background-vector-145836710 has a few possibilities.

scrolling in location function with mobile

when you get to the end of the scroll up and down it starts to affect the underlying tree page and tries to scroll that. I suspect this is annoying and difficult to fix but should be recorded in any case.

In settings the tree changing switch goes to non-existent pages

It correctly tries to switch to the alternative urls, but the view for each (e.g. default/linnean.html) does not exist any more. These views need reinstating.

Also, we should possibly create the list dynamically, from a list of views, so this doesn't happen again.

Occasionally we create urls to impossible places

E.g. life.html/@mantodea=656293?vis=spiral#x3335951899,y2670646326,w9512788.9481

Which makes the canvas look blank, and requires a lot of zooming out. From URLs like this we should probably jump to a zoom level that at least shows something on the screen.

code alternative branch style for bacterial branches

As it is unclear whether bacterial relationships are ever really "tree-like" in the first place (and even if so, the tree will only represent a small fraction of the "core genes" in the genome). Additionally, the rooting of the bacterial tree is very uncertain. So something that marks out the bacterial branch as only partially representing the relationships (e.g. a dotted or faded line) would be good.

Additionally, we might not want the standard view (especially the polytomy view) to look as if it is rooted.

Allow a standalone JS viewer (without requiring Web2py)

For people who want to develop the JS code, we should really not require them to run an entire web2py server. There should be a way to call the JS code from a static web page, and get nearly everything else, API calls, etc, (although perhaps not the completetree etc. files?) from our server. This should mostly be easy, as we can specify which URLs to use for the API etc in the treeLayout page.

In fact, I think the main issue here is internationalisation, because we load up the UI from a served-up web page (viewer_UI.load) which is translated into different languages. However, we could simply ask the downloader to pick a particular language, and save a copy of viewer_UI.load in that language.

Enable independent leaf draw code use for embedded sponsor_leaf page

The code currently in 2 files in rawJS/OZTree/src is a duplicate of leaf drawing code in the main OZ codebase, used to draw leaves e.g. on the sponsor page.

We should modify the main codebase so that we can call these functions on an independent canvas using the main codebase, not rely on separate files.

This is needed because if we embed the sponsor_leaf.html code within a popup (rather than using an iframe), then we need access to that js code, as quite rightly we can't run js from an embedded page.

Control buttons disappear on tab popup

When a modal popup is opened, the control button bar on the bottom left disappears. I don't mind this behaviour, but I'm worried that I don't understand why it happens, although I suspect it is something to do with overflow: hidden being set on the body element in the css file.

Search seems to give unexpected results

Behaviour observed in Oxford botanic gardens on the touchscreen: often many non-hit search results are returned. I suspect this might be because of firing off the search too easily, so that if you type "collared", a search is requested for 'col' before the rest of the word is typed. Perhaps the search delay in the UI is too long, or is being ignored by the touchscreen.

Make embedded own pages pinch-zoomable (e.g. with PanZoom)

E.g. it might be possible to create our own wikipedia frames, which encapsulate the wikipedia page but also turn off pinch-to-zoom. That way we don't need to inject e.g. the wikipedia css into the main OneZoom page, which has always struck me as a bit hairy. URLs could be of the form www.onezoom.org/iframe/wiki.html?Qid=xxx&lang=xxx (DONE)

We could possibly do the same for EoL / IUCN / etc pages (perhaps not for the museum display, but simply displaying the page with links and a BASE tag set), which will get around https://github.com/jrosindell/OneZoomComplete/issues/381. (This is also a potential solution to #21 and also to the issue of moving from the sponsor_node page to the sponsor_leaf page)

Sponsorship shared with e.g. conservation organisations

We should have the ability to add (to the default OZ tree) a set of nodes which lead to e.g. 1/2 the money going to another organization whose goals align with ours. For instance, half the sponsorship money on any of the 8 slow lorises could go to http://www.nocturama.org/en/welcome-little-fireface-project/ , or as Jonathan suggested, we could have a 1 week "special offer" where any sponsored bird gives 50% to the RSPB.

We could also run a competition, open to e.g. conservation charities, for access to this scheme.

This should actually be quite easy. Yan thinks we should save all this info in the partners table, which would require a few more fields, in particular, a list of OTT ids for which this partnership is valid (could also be a node OTT, in which case we look up the descendant leaves in ordered_nodes). There would also need to be a field which flagged up if this was like LinnSoc (only on a single tree, with different URL), or like slow lorises (valid only on the default OZ tree).

current location option UI design

A few issues with this...

1.) space is left on the right for a scroll bar even when one is not needed
2.) when fully zoomed out no data is shown (probably instead it should show just the root still) or some message saying when you've zoomed in this will show where you are.
3.) when I explore the tree on touch it does not dismiss the location box as it should, in fact it dismisses only on mouse up (not even on mouse down).

Links *within* a modal close the modal

E.g. if in the museum display we inject a wikipedia page with footnotes (look e.g. at the node for "animals"), then when we click on a footnote, instead of being taken down the page, the modal shuts

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.