Code Monkey home page Code Monkey logo

manifoldscholar / manifold Goto Github PK

View Code? Open in Web Editor NEW
234.0 24.0 29.0 293.68 MB

Transforming scholarly publications into living digital works.

Home Page: http://manifoldapp.org

License: GNU General Public License v3.0

Ruby 36.73% HTML 0.69% JavaScript 58.93% CSS 0.69% Shell 0.18% TeX 2.76% Rich Text Format 0.01% SCSS 0.01% PLpgSQL 0.01% EJS 0.02% Procfile 0.01%
epub academic-publishing open-access oer minnesota-press university library-publishing manifold

manifold's People

Contributors

1aurend avatar connorchristensen avatar dananjohnson avatar dependabot[bot] avatar jen-castiron avatar leonorpdx avatar lthurston avatar mollyjeanb avatar naomiyaki avatar quinnschwartz avatar salbertson avatar scryptmouse avatar smaxowok avatar timfrazee avatar zdavis 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

manifold's Issues

Add keyboard inputs to all modal dialogs

When there's a modal dialog UI with an OK and cancel button, users should be able to interact via keyboard input. Return should trigger the OK callback, and escape should trigger the cancel callback.

Improve scroll behavior on route change

Currently this is handled in an ad hoc way. When the Frontend Container receives new props, it checks to see if the location has changed. If it has, the container scrolls the window to the top. This behavior needs to be made more nuanced. For example, if the route stays and params change, we likely do not want to scroll. We may want to delegate the scroll decision to children containers. Furthermore, rather than implementing this in the Frontend Container, it should be implemented in a router decorator.

This is a current problem for resource collection filters, which change param and cause an awkward scroll.

Model filter loses scope after validating paginated results

The filterable model concern contains functionality related to paginating filtered result sets. After the query is completed, the concern checks to see if the requested page exceeds the last available page. If it does, it re-runs the query to return results for the last available page.

The problem here is that in doing so, the initial scope passed to the filter method is not maintained.

CrossRef DOI integration

DOIs

We store the following DOIs in Manifold:

  1. Project Landing Page => Dataset
  2. Project All Resources Page => Dataset
  3. Resource => Component
  4. Text Landing Page => Book (published text) or Posted Content (provisional)
  5. TextSection => Article

UMNP will likely not assign DOIs to TextSections, provisional texts, and individual resources, but other texts may.

#1 and #2 will be assigned when the project is created

Other DOIs will be manually triggered by backend users. For example, when a text is ingested, the backend might prompt the user as to whether or not she wants a DOI to be created.

Manifold will need a mechanism to synchronize its DOI locations with CrossRef.

Assigning/saving DOIs will need to be an idempotent process that can be run multiple times.

Build this as a service with an adapter that is cross-ref specific in case someone in the future wants to integrate with another vendor.

Terence will give me sample DOIs for each object so I know how to structure them.
Zach will produce sample XML for each request and share it with the CrossRef representative before proceeding with development.

Consider removing large drop shadow below reader top bar

As a reader I often use the top crop of the reading area as a guide for my place. By including a deep shadow there after scrolling a bit, I no longer have a comfortable break to orient with. I have heard from others that they read in the same way.

Replace 'menu' with a close 'x' in reader

On a phone, I think the "Menu" link in the top left of the reader takes up too much space. I find myself expecting the TOC button to live there. I propose replacing it with a close button (like what we had there a few months back) to move the more useful TOC button into a more natural position. Thoughts?

CSS Validator throws an exception with invalid CSS

Attempting to ingest the wasteland text in api/spec/data/epubs/v3/wasteland.epub triggers an exception in the CSS validator.

In the EPUB's stylesheet, there is a declaration with a *[epub|type~='dedication'] selector:

*[epub|type~='dedication'] {
    padding-left: 2em;
}

The Validator::Stylesheet class reads the tag in this selector as TAG_='DEDICATION'], and tries to look up a constant named TAG_='DEDICATION']_CSS_PROPERTY_BLACKLIST in the CSS_PROPERTY_BLACKLIST based on this. This in turn throws a NameError exception in const_defined?

We need to improve the performance of the rightmost_selection method, and we need to catch NameError exceptions here and just return blacklist if it's shown.

Form upload component does not remove attachment

data: {attributes: {avatar: null}}
type: "project"

Form upload component is no longer removing the attachment on submission. Seems like a regression. remove[attachmentName] is no longer being sent with the request.

Bookmarking and storing last read position in texts

This is going to be tricky. Here's my initial thinking on this, which could change.

  1. Let's make a bookmark record. Bookmarks belong_to a text_section and they belong to a user. Bookmarks delegate text to the text_section. = Bookmarks have a boolean "automatic" property that we can use to distinguish between user generated bookmarks and bookmarks created automatically to save the user's place. There can only be one automatic bookmark per text, and it is used to record the last reading position in the text. Bookmarks have a node_uuid property that references the text node that was bookmarked. Let's also store the contents of the bookmarked text node.

  2. Expose bookmarks via a CRUD mechanism. Nest these under the "me/relationships" since bookmarks will always be created

  3. Use a route exit transition (we use this to check when users are leaving an unsaved form) to automatically create a new bookmark in the API when the user leaves a text. Remember, only one auto-generated bookmark per text.

  4. When a user comes to a text, check and see if there's an autogenerated bookmark for the text. If so, prompt the user with a modal that asks them if they'd like to go to the last read point. We might show a snippet in that modal showing them where they were last, or at least the section title.

This is still a rough concept, so I expect some refinement as it's developed. If you have suggestions on how we can improve this, speak up.

Issues parsing Manifold-Docs TOC

I just tried to ingest the updated Manifold Documentation into my environment. It mostly worked, after cleaning up some empty files. However, the links in the TOC in the Manifold reader are all wrong. Could you take a look? Perhaps I'm doing something wrong in the Summary.MD file β€”Β in any case, the ingestor should probably not write the TOC entry if it can't find a corresponding section.

Manifold utilizes Postgres JSONB field for storing text section content

It's currently a text field that's deserialized by TextSectionPartialSerializer:

  def body_json
    find = "/system/ingestion_sources/attachments"
    replace = Rails.configuration.manifold.api_url + find
    return "{}" if object.body_json.blank?
    JSON.parse object.body_json.gsub(find, replace)
  end

I think we should remove the gsub as well now that we're hosting the API and the client on the same domain. Even if they're on different domains, I think it'd be better to handle these paths during ingestion rather than during rendering.

Installation instructions are included in manifold/manifold-docs

Following the build instructions in the README (running ruby 2.3.3) I am trying to ingest the specpubs and get:

spring stop && rake ingest:specpubs

Spring is not running
{:EPUB=>Ingestor::Strategy::EPUB::Strategy, :Word=>Ingestor::Strategy::Word::Strategy, :Gitbook=>Ingestor::Strategy::Gitbook::Strategy, :GoogleDoc=>Ingestor::Strategy::GoogleDoc::Strategy}
I, [2017-04-12T13:57:38.691737 #18354] INFO -- : Ingesting wasteland.epub!
I, [2017-04-12T13:57:38.802123 #18354] INFO -- : Ingestor::Strategy::EPUB::Strategy can ingest? true
I, [2017-04-12T13:57:38.802393 #18354] INFO -- : Using strategy Ingestor::Strategy::EPUB::Strategy
I, [2017-04-12T13:57:38.810508 #18354] INFO -- : No existing text model found for source ID code.google.com.epub-samples.wasteland-basic
I, [2017-04-12T13:57:38.812503 #18354] INFO -- : EPUB version is 3.0
I, [2017-04-12T13:57:38.848429 #18354] INFO -- : New title: "The Waste Land"
I, [2017-04-12T13:57:38.906481 #18354] INFO -- : New creator: "T.S. Eliot"
I, [2017-04-12T13:57:38.910900 #18354] INFO -- : Setting language to "en-US"
I, [2017-04-12T13:57:38.912128 #18354] INFO -- : Setting publication date to "2011-09-01"
I, [2017-04-12T13:57:38.913257 #18354] INFO -- : Setting rights to "This work is shared with the public using the Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) license."
I, [2017-04-12T13:57:38.914326 #18354] INFO -- : Setting description to ""
I, [2017-04-12T13:57:38.914485 #18354] INFO -- : Attempting to save the text
E, [2017-04-12T13:57:38.922525 #18354] ERROR -- : Text : Collaborators is invalid
E, [2017-04-12T13:57:38.922651 #18354] ERROR -- : Text : Creator must exist
E, [2017-04-12T13:57:38.944193 #18354] ERROR -- : Unable to save text due to ingestion errors.
E, [2017-04-12T13:57:38.946794 #18354] ERROR -- : Ingestor::IngestionFailed
... [same for all EPUBs]..

Seems like the creator & collaborator models are not being created even though it discovers them?

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.