Giter Site home page Giter Site logo

tailordev / monod Goto Github PK

View Code? Open in Web Editor NEW
874.0 21.0 61.0 3.37 MB

:notebook: Our cool, secure, and offline-first Markdown editor.

Home Page: https://monod.lelab.tailordev.fr/

License: MIT License

JavaScript 66.79% CSS 26.36% Shell 0.09% HTML 0.53% TeX 6.23%
offline-first markdown-editor secure

monod's People

Contributors

codeahead14 avatar gar avatar greenkeeper[bot] avatar greenkeeperio-bot avatar jacquesbh avatar jmaupetit avatar krichprollsch avatar kunamatata avatar lodelestra avatar pauldebus avatar prayashm avatar tmpace avatar willdurand avatar zdoc01 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

monod's Issues

Revision introduced in #55 introduces error on Heroku

Heroku deployment fails because of #55 as the applicatio does not live in a Git-based directory:

remote:        Error: Command failed: git rev-parse HEAD
remote:        fatal: Not a git repository (or any parent up to mount point /tmp)
remote:        Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set)

We can fix it by using the SOURCE_VERSION env var if available. As I think we will have the same issue with Heaven, let's use SHA too:

const VERSION = process.env.SOURCE_VERSION || process.env.SHA || childProces....;

Allow html in raw content

This may be a security issue, but we must allow html tags and avoid sanitizing raw content. This is part of the markdown specs.

Clarify application dev/production dependencies

In my opinion, as we make a build for production, almost nothing is required for production except lazy loaded assets as CodeMirror modes or application sprites. The package.json file should be fixed accordingly.

Improve app version rendering

As suggested by @willdurand the application version should be stored in the <body>'s data-monod-version attribute and the dedicated block should be part of the application's .layout. At this time it is rendered without styles before the application and it's really ugly/bad.

Design a protocol for rendering speed test

I would like to collect metrics to objectively evaluate improvements related to the recent chunks rendering strategy. Moreover, benchmark our editor compared to stackedit (or other competitors) with the same protocol would be a plus. This study may be published in a new blog post.

I have not done my homework yet, but @willdurand do you have an idea how to programmatically access to relevant metrics? With Chrome developer tools? Or should we use a headless browser like PhantomJS?

Add emoji support in front-matter values

It appears that gray-matter fails at parsing YAML front-matter with an emoji ๐Ÿ˜ข

Edit (2016-09-28): it is required to enclose Emoji with quotes because it is how YAML is supposed to work:

variable: "Hello :tada:"

This issue is therefore about rendering Emoji from the YAML front-matter in the preview of a template, which is... challenging.

Git revision

// webpack.config.js

const childProcess = require('child_process');

const VERSION = childProcess.execSync('git rev-parse HEAD').toString();

Then, we can edit the HtmlWebpackPlugin:

// webpack.config.js

        new HtmlWebpackPlugin({
            // Here, we use the `html-webpack-template` npm package
            template: 'lib/webpack-template.ejs',
            // The page's title is read from npm's `package.json` file
            title: pkg.name,
            version: VERSION,
            // Main "div" `id`
            appMountId: 'app',
            // No need to inject assets in the given template as it is handled
            // by the template itself
            inject: false
        })

And finally, the template:

<!-- lib/webpack-template.ejs -->
<p class="git-version"><%= htmlWebpackPlugin.options.version %></p>

Front Matter support

Determine the best way to retrieve front matter data (YAML parsing may be an option).

Scrolling boundary conditions

Top boundary conditions can be optimize with something like:

if (top <= clientHeight / 2) {
  this.props.doUpdatePosition(top / height);
} else {
  this.props.doUpdatePosition((top + clientHeight) / height);
}

Monod crashes when rendering html nested blocks

The app crashes in dev (not in production) with FF 44.0.2 (MacOSX) when trying to render preview for the first time. Console message is:

Error: Danger: Did not assign to every index of resultList.

Still investigating.

Update development documentation

One need to update development documentation to add the following:

In development you will need to serve the app and the back-end separately (in two terminal sessions):

$ npm start  # back-end

---
$ npm run dev  # the app

If it's the first time you run the app, you will need to create MONOD_DATA_DIR (defaults to data):

$ mkdir data

Update preview scrolling while editing the last line of a long document

It would be nice to scroll the preview to the bottom while editing the bottom of a document. To reproduce this scenario:

  • Add a long text to the editor (longer than the ClientVerticalHeight)
  • Scroll to bottom
  • Everything is now sync
  • Add a new line at the bottom and start typing
  • You feel a bit frustrated for not seeing live preview on the right

Switch back to a single style sheet

After testing a separated print style sheet on google chrome, it seems that the same behavior occurs as with a single style sheet with print media. Hence, we need to rollback to a single style sheet to be able to test it in development.

Server error (500 or 400)

  • handle client error
  • handle server error
Apr 01 15:12:58 splinter docker/monod-staging:  { [Error: ENOENT: no such file or directory, open '/data/a1ce5cdc-1766-4364-ac6d-2a849ffc45e7']
Apr 01 15:12:59 splinter docker/monod-staging:    errno: -2,
Apr 01 15:12:59 splinter docker/monod-staging:    code: 'ENOENT',
Apr 01 15:12:59 splinter docker/monod-staging:    syscall: 'open',
Apr 01 15:12:59 splinter docker/monod-staging:    path: '/data/a1ce5cdc-1766-4364-ac6d-2a849ffc45e7' }

[preview] 'nextState' is defined but never used

Small error log in the console:

ERROR in ./app/components/Preview.jsx

/Users/maupetit/WebDev/TailorDev/tdit/app/components/Preview.jsx
  50:36  error  'nextState' is defined but never used  no-unused-vars

โœ– 1 problem (1 error, 0 warnings)

Improve report template

Purpose

The idea is to make the report template a little bit more pretty. We think that Overleaf is a good source for inspiration: https://www.overleaf.com/gallery/tagged/report.

A report is a document that contains information about a project of any kind (thesis, internship, milestone, etc.). We would like to have the following information:

  • title
  • date
  • version
  • (optionally) reporter name(s)
  • (optionally) institution name

The report template could add a first-page like this one, and then leave the rest of the document "as is" (with a reader-friendly font). It is just an example of what could be done ;-)

Proposal

The code of this template is here: app/components/Templates/Report.jsx. It is a React JSX component that owns its style and metadata (extra variables). We would like to improve its current look but we don't have many expectation except to make it more useful and nice. It is quite subjective, but we are open to any suggestion as @jmaupetit said in his comment below.

Cheers!


Issue last updated by @willdurand.

Fix raw default text

The default text include an empty reference link to Markdown :(

Here is my proposal raw content:

Introducing Monod
=================

> **TL;DR** This editor is the first experiment we wanted to tackle at **Le lab**. This _week #1 release_ is a pure client-side application written with [React](https://facebook.github.io/react/) by the good folks at [TailorDev](https://tailordev.fr)!

Read more about how and why we build Monod at: https://tailordev.fr/blog/.

See: we have code & Emoji support, yay! :clap:

``` python
def hello():
    print("Have fun with Monod!")

Play with this page and [give us feedback](mailto:[email protected]?subject=About Monod). We would โค๏ธ to ear from you!

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.