GithubHelp home page GithubHelp logo

paperhive / frontend Goto Github PK

View Code? Open in Web Editor NEW
18.0 9.0 5.0 3.63 MB

PaperHive frontend

Home Page: https://paperhive.org

License: GNU General Public License v3.0

JavaScript 2.60% CSS 9.00% HTML 40.29% TypeScript 47.86% Shell 0.20% Dockerfile 0.05%

frontend's Introduction

PaperHive Frontend

Build Status Sauce Labs Status

Setup

Requirements

  • nodejs and npm (included in nodejs): the easies way to install nodejs is via nvm

Configuration

The build (npm run build) and development (npm run watch) scripts respect these optional environment variables that you might want to change:

  • PAPERHIVE_API_URL (optional): the PaperHive API to use. Defaults to https://dev.paperhive.org/master.
  • PAPERHIVE_BASE_HREF (optional): the base path where the frontend is served. Defaults to /.

Build

git clone [email protected]:paperhive/paperhive-frontend.git --recursive
cd paperhive-frontend
npm install
npm run build

Upon completion, the files for deployment are placed in the directory build/.

Static files

Make sure you passed --recursive to the clone command (see above). If you switch branches and want to checkout the static files associated with the current branch run

git submodule update

Atom packages

The following atom packages are recommended:

  • atom-typescript
  • linter-tslint
  • linter-eslint

Development

Running

npm run watch

continuously builds the project (upon changes of the code) and fires up an HTTP server which can be reached via http://localhost:8080.

Testing locally

Make sure that the frontend builds without errors,

npm run build

and that the selenium drivers are installed and up-to-date,

`npm bin`/webdriver-manager update

After that,

npm test

runs both unit and e2e tests.

License

The PaperHive frontend is licensed under the GPL3 license.

frontend's People

Contributors

andrenarchy avatar nschloe avatar jengeb avatar pure180 avatar lena-mari88 avatar greenkeeper[bot] avatar carolinagc avatar greenkeeperio-bot avatar alexandernaydenov avatar nathraq avatar dercorn avatar

Stargazers

Hima avatar Moritz avatar Ricky avatar SebastianNordhoff avatar Daniel Boles avatar abdul dakkak avatar David A. Lareo avatar Sarven Capadisli avatar Velizar Shulev avatar  avatar Andrzej Piotrowski "Poland" avatar Hendrik Sollich avatar  avatar  avatar  avatar  avatar  avatar shdev avatar

Watchers

James Cloos avatar Andrzej Piotrowski "Poland" avatar  avatar  avatar shdev avatar  avatar Alexander Naydenov avatar  avatar  avatar

frontend's Issues

move mentio out to its own directive

Right now, user search and text replacement functions reside in CommentCtrl, but are not accessible from everywhere there. Moving out the entire mentio machine into its own directive will solve this.

Enable PDF.js web workers

Currently the PDF.js web workers are not enabled because we use the combined js file. In this build, the web workers cannot be enabled since it is required to load a web worker from a separate file, see the docs. The web worker has to be excluded from the browserify build and should be minified separately.

Deserialization failure

Deserialization fails when switching from the discussion view to the text view.

Possible reason: controllers that are shared between views.

use devDependencies

Move the development dependencies from dependencies to devDependencies, either bower or npm.

MathJax crashes when `\\` is typed

The error message reads

Failed to load resource: the server responded with a status of 404 (Not Found)
(139) <error>
MathJax.js?config=TeX-AMS_HTML-full,Safe:19 Uncaught RangeError: Maximum call stack size exceeded

Use ng-show instead of ng-if if not performance-critical

ng-show simply hides elements while ng-if actually removes them from the DOM.

Especially when custom handlers are in play (e.g., pdf selection), ng-if leads to nasty bugs because event handlers may be lost. I suggest we use ng-show everywhere unless the element is performance-critical. See also here.

Use Page Header as a shared part

i guess it would be better to use the page header as a shared content element, which will be included with ng-include on the respective site, with dynamic content for each too.

Expose bibliographic metadata of articles

We could link to an external site for article metadata or offer an export of our metadata in several formats (e.g., bibtex). This doesn't have high priority right now but I'm adding the issue so we don't forget about it. :)

Thx @cholin for the feature request!

Check clearfix for floats

Apply clearfix class to containers of pull-right, pull-left or other classes that make use of the float property.

Links to text selections

If the user selects text in the PDF, a create link to selection option should be shown. When the generated URL is loaded, the previously selected text should be highlighted and the viewport should scroll to the corresponding position.

Thx @highlando for the feature request!

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.