Giter VIP home page Giter VIP logo

labbook's People

Contributors

almailer avatar shikasta-net avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

almailer

labbook's Issues

Require unique container ID in content database

To imporve robustness (if possible) content should belong to only one container and containers only have one content associated.

Should be possible with existing database structure.

This might help address situations raised with issue #2

Mathjax changed config requirements

Mathjax now pops up a message that it no longer loads a config file by default. This was working on branches thumbnail and sectiontree prior to merge.

Storage of user content

Choice about storage of text, images and other user page content.

Options:

  1. File structure (already done)
  2. Dedicated database table

The advantage of 1 is that the user can find files they want to extract. This has risks of users altering files directly. It is also not easy for a user to navigate becuase finding a file requires knowing the page and container ID it is located in. Versioning requires separate implementation from the page and container tables in the main program.

Since versioning of tables can now be done easily within Web2Py it seems appealing to use option 2 as mention in iss #5. This may result in an oversized table, long export times and some files may have problems being stored in their native format in this way. However, it seems more robust and streamlined with the rest of the application.

Default box layouts

When creating boxes there maybe use for layout templates which create a number of boxes with default dimensions and positions. Similar to power point page layout templates.

4 and 6 box grids are obvious choices. Perhaps large image and caption box.

Annotation tools

Oval and arrow tools to highlight aspects and thought processes.

Using SVG image of arrow or oval which fits to an invisible annotation box diagonally. Thus orientation and sizing should be trivial.

Database return types

In addressing #13 the return type was forced to be a list of dictionaries rather than Row objects. This means entry.attribute now has to be entry['attribute']. Other methods in the model should probably be brought in-line to return a standardised output type.

For single return actions, simply append .as_list() to the .select() statement.

Also clean up:
myrecord = db(db.mytable.id==id).select().first()
to
myrecord = db.mytable[id]

Support for offline usage

Currently we need to import a lot of libraries from the internet (MAthJax, PDF.JS, jQuery etc). I think we discussed this before, and agreed not for this release, but eventually some way to provide offline libraries (like we do with MathJax) should be formalised. Maybe an import controller, which either redirects to local URLs if local import is active or external URLS if not?

Some form of startup screen

I hate to add a new feature, but I think this one is important.

Having tried a clean LabBook install on my new computer, I note that there are a couple of things needed on install. It'd be good to have a page which can check if these conditions are met, e.g.

  • Does the preference 'useLocalMathJax' exist?
  • Does the root section exist? (I'm not sure if this is still necessary - Kym?)

The current version will be a temporary measure, as we don't know what we want the startup screen to look like yet. But I think it could be useful.

Embeded calculations

The ability to include small calculations where the method is worth keeping on record along with the result.

eg. a mini spread sheet or iPython notebook.

Crossbox possition is null

Dragging a file over a content box produces

crossElement.position() is null
var x = crossElement.position().left; line 53 of crossbox.js

Database implementation

PostgreSQL may provide better database handling for our needs than SQLite.

Open source and supported by web2py.
It reduces RAM overhead by storing BLOB data in a separate table and is able to handle bigger files.
Provides backup support as part of the database.

[thumbnails] Image upload not catching

Drag and drop of images fails to capture event fully. Box becomes corrupt with unknown box type. Probable upload address issue as was the case with the text editor (need standard address and port settings).

Error message is displayed but browser loads image file before it can be read.

Probably reproducible on master from which thumbnails branched.

Crossbox flashes while hovering

Steps to reproduce:

  1. Drag an image so that it hovers over a content box, summoning a crossbox.
  2. While holding the drag, move the mouse so that it remains within the crossbox.
  3. After about 5 seconds, the crossbox starts flashing.

Notes:
Related to Issue 1?

Option bar cut copy paste

Requires issue #21

Implement transparent mouse over buttons for all containers with Cut, Copy and Paste, and Delete container as default.

Extendible with other buttons later.

Update single page view

  1. Move to new controller (not default controller)
  2. Scrolling between pages
  3. Moving between sections (navigation bar - treeview?)

Image box moving has disappeared!

At some point the ability to move images around inside their boxes (double-click to activate/deactivate) disappeared. I think it must have been when we moved to the render controller for rendering pages. No worries, I think I can restore it...

Implement new controller to handle rendering page components

Part of issue #12. Allow the rendering of various components of the LabBook interface (e.g. a single box, a single page, a single section) through a separate view/controller interface. For example,

http://127.0.0.1:8000/LabBook/render/page/1/
would return the html for page_id = 1 (can be visited in browser or fetched with AJAX)

http://127.0.0.1:8000/LabBook/render/box_content/1/
would return the html for the content of box_id = 1 (note that rendering the actual box, rather than the content, doesn't seem to make sense without a page to render it on, as the x and y coordinates would not be defined)

This interface can then be used to render page components e.g. in treeview style.

Sectioning removed in master branch

I removed any way of sectioning pages when I updated the master branch to use a single box table.

The section table will need to be uncommented, to allow attaching metadata to sections (e.g. titles and colours). Clearly pages and sections need to be ordered on an arbitrary basis.

I can see two ways of implementing sectioning with page numbering in the pages table:

  • Add fields parent_section (type reference section) and page_number (type integer) to the pages table and a section_number field to the sections table. This choice is database intensive for updating but not querying, as when inserting/moving/deleting pages every page_number after the modified record will have to be updated. However, querying is simple since one can just select page records by parent_section and order by page_number.
  • Alternatively, add fields parent_section (type reference section) and next_page (reference pages) to the pages and sections tables. Updating is now simple (max 1 update) but querying complex, since all pages need to be strung together to establish page ordering. One possible scheme for doing this (e.g. in python):
    pages_in_section = db(db.pages.parent_section == section.id).select()
    ordered_pages = [None] // None is to terminate while when reaching end of section
    for page in pages_in_section:
        temp_list = [page]
        while temp_list[-1].next_page is not in ordered_pages: temp_list.append(temp_list[-1].next_page)
        ordered_pages = temp_list + ordered_pages
    del ordered_pages[-1]

I guess we'd have to do this for the section table as well.

If we weren't going to version the page numberings, I'd go for option 1, since it's easier to understand. However, with versioning, we'd need to store a row in the versioning table for every row updated, so every time a page number is updated, we'd need to write new rows into the versioning table. For this reason, I propose we go with the second route, and hide the details in a function in the model.

Layout structuring

Improvements to the layout and additional functionality

Tree layout:

  • Top panel contains section name, back button and add page button.
  • Pages panel contains list of pages with drag and drop for rearrange, click to focus and highlight.
  • Page controls panel with buttons to go into page, create box(s)

Page layout:

  • Back to highlighted page floating link

Container box not properly remembering type

Steps to reproduce:

  1. Open a page in page view.
  2. Create a new box.
  3. Click on the box. The options bar for an empty box appears, as it should.
  4. Refresh the page.
  5. Click on the box. No options bar appears, and "unknown type, no options to display" appears in the console.

Notes:

Maybe it would be better to define the type of content box by looking at its children, as returned from the server

  • If the container has no children, it is empty type
  • If the container has a single img node as its only child, it is imgbox type.
  • If the container has a single div node as its only child, it is textbox type.
  • Having other tags, or more than one child, is invalid behaviour.

Related to Issue 1?

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.