Coder Social home page Coder Social logo

cozy-notes's Introduction

Travis build status shield Github Release version shield jest

Cozy Notes

What's Cozy Notes?

Note manager for Cozy Cloud

Hack

📌 Note: we recommend to use Yarn instead of NPM for package management. Don't hesitate to install and use it for your Cozy projects, it's now our main node packages tool for Cozy official apps.

Install

Hacking the Cozy cozy-notes app requires you to setup a dev environment.

You can then clone the app repository and install dependencies:

$ git clone https://github.com/cozy/cozy-notes.git
$ cd cozy-notes
$ yarn install

📌 If you use a node environment wrapper like nvm or ndenv, don't forget to set your local node version to >= 12 before doing a yarn install.

Cozy's apps use a standard set of npm scripts to run common tasks, like watch, lint, test, build…

Run it inside the VM

First, you need to install docker and our cozy-app-dev image. See how to in our install the development environment documentation

Then, you need to build at least once the Notes app before running the docker image:

$ yarn start

Then, in an other process, you can run the docker image:

$ yarn stack:docker:dev

Your app is now available at http://app.cozy.localhost:8080.

Password is cozy by default.

This command uses the cozy-stack docker image.

By launching this stack:docker:dev command, you disable our Content Security Policy (CSP) (which are very restrictive by default) to have access to the HMR. Don't forget to test your builded application (not watched) using stack:docker:prod to activate them.

Living on the edge

Cozy-ui is our frontend stack library that provides common styles and components accross the whole Cozy's apps. You can use it for you own application to follow the official Cozy's guidelines and styles. If you need to develop / hack cozy-ui, it's sometimes more useful to develop on it through another app. You can do it by cloning cozy-ui locally and link it to yarn local index:

git clone https://github.com/cozy/cozy-ui.git
cd cozy-ui
yarn install
yarn link

then go back to your app project and replace the distributed cozy-ui module with the linked one:

cd cozy-drive
yarn link cozy-ui

Cozy-client is our API library that provides an unified API on top of the cozy-stack. If you need to develop / hack cozy-client in parallel of your application, you can use the same trick that we used with cozy-ui: yarn linking.

Tests

Tests are run by jest under the hood. You can easily run the tests suite with:

$ cd cozy-notes
$ yarn test

📌 Don't forget to update / create new tests when you contribute to code to keep the app the consistent.

Models

The Cozy datastore stores documents, which can be seen as JSON objects. A doctype is simply a declaration of the fields in a given JSON object, to store similar objects in an homogeneous fashion.

Cozy ships a built-in list of doctypes for representation of most of the common documents (Bills, Contacts, Files, ...).

Whenever your app needs to use a given doctype, you should:

  • Check if this is a standard doctype defined in Cozy itself. If this is the case, you should add a model declaration in your app containing at least the fields listed in the main fields list for this doctype. Note that you can extend the Cozy-provided doctype with your own customs fields. This is typically what is done in Konnectors for the Bill doctype.
  • If no standards doctypes fit your needs, you should define your own doctype in your app. In this case, you do not have to put any field you want in your model, but you should crosscheck other cozy apps to try to homogeneize the names of your fields, so that your doctype data could be reused by other apps. This is typically the case for the Konnector doctype in Konnectors.

Open a Pull-Request

If you want to work on cozy-notes and submit code modifications, feel free to open pull-requests! See the contributing guide for more information about how to properly open pull-requests.

Atlaskit

We use Atlassian Atlaskit under the hood to provide a note editor. See documentation here

Community

What's Cozy?


Cozy is a platform that brings all your web services in the same private space. With it, your webapps and your devices can share data easily, providing you with a new experience. You can install Cozy on your own hardware where no one's tracking you.

Localization

Localization and translations are handled by Transifex, which is used by all Cozy's apps.

As a translator, you can login to Transifex (using your Github account) and claim an access to the app repository. Locales are pulled when app is build before publishing.

As a developer, you just have to modify json in /src/locales. New locales will be automatically added to Transifex. If you need to pull or push manually locales, you can use Transifex CLI. If you were using a transifex-client, you must move to Transifex CLI to be compatible with the v3 API.

Maintainer

The lead maintainer for cozy-notes is cozy, send him/her a 🍻 to say hello!

Get in touch

You can reach the Cozy Community by:

License

cozy-notes is developed by edas and distributed under the AGPL v3 license.

cozy-notes's People

Contributors

acezard avatar cballevre avatar clochix avatar crash-- avatar dependabot[bot] avatar drazik avatar edas avatar jf-cozy avatar ldoppea avatar polaritoon avatar poupotte avatar ptbrowne avatar renovate-bot avatar renovate[bot] avatar sblaisot avatar trollepierre avatar y-lohse avatar zatteo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

cozy-notes's Issues

mattermost post

Currently we do not have any post publication message in our mattermost channel. We should fix that

Add comments feature

Is adding comments feature on the roadmap? It's a super useful feature for collaborative document editing!

Same as google docs, you could

  • highlight some text, add a comment to the side
  • someone could reply to that comment and start a thread under it
  • you could resolve/dismiss a comment

Would be awesome to get that :)

In local, clicking on the "add new note" redirect the user to the page "Application not yet available"

I followed the steps mentioned in the README file to start the application.

The app is available at http://app.cozy.localhost:8080/ but when I'm clicking on the "Add new note" i'm redirected to http://notes.cozy.localhost:8080/?returnUrl=http%3A%2F%2Fapp.cozy.localhost%3A8080%2F#/n/f0f1b0fc25b1265b4ef08fcd60008dff. The page display this message: "Application not yet available".

I have found a workaround by adding a 'notes' volume in the stack:docker:dev command.
"stack:docker:dev": "COZY_STACK_HOST=cozy.localhost docker run --rm -it -p 8080:8080 -p 5984:5984 -e COZY_DISABLE_CSP=1 -v $(pwd)/build:/data/cozy-app/app -v $(pwd)/build:/data/cozy-app/notes cozy/cozy-app-dev",
I'm not sure if it's the correct way to fix this issue.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Repository problems

Renovate tried to run on this repository, but found these problems.

  • WARN: Using npm packages for Renovate presets is now deprecated. Please migrate to repository-based presets instead.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • fix(deps): replace dependency @material-ui/core with @mui/material
  • fix(deps): replace dependency @material-ui/styles with @mui/styles
  • fix(deps): pin dependencies (@cozy/minilog, babel-jest, babel-preset-cozy-app, node)
  • fix(deps): update dependency @testing-library/react to v12.1.5
  • fix(deps): update dependency classnames to v2.3.2
  • fix(deps): update dependency utf-8-validate to v5.0.10
  • fix(deps): update material-ui monorepo (@material-ui/core, @material-ui/styles)
  • fix(deps): update dependency @atlaskit/icon to v21.12.7
  • fix(deps): update dependency @atlaskit/media-core to v32.3.1
  • fix(deps): update dependency @testing-library/jest-dom to v5.17.0
  • fix(deps): update dependency babel-preset-cozy-app to ^2.1.0
  • fix(deps): update dependency cozy-device-helper to ^2.7.0
  • fix(deps): update dependency cozy-doctypes to v1.88.6
  • fix(deps): update dependency eslint-plugin-react to v7.33.2
  • fix(deps): update dependency prosemirror-model to v1.19.3
  • fix(deps): update dependency react-router-dom to v6.17.0
  • fix(deps): update dependency rooks to v7.14.1
  • fix(deps): update cozy client packages to v41 (major) (cozy-client, cozy-stack-client)
  • fix(deps): update dependency @atlaskit/editor-tables to v2
  • fix(deps): update dependency @atlaskit/media-core to v34
  • fix(deps): update dependency @testing-library/jest-dom to v6
  • fix(deps): update dependency @testing-library/react to v14
  • fix(deps): update dependency bundlemon to v2
  • fix(deps): update dependency cozy-bar to v10
  • fix(deps): update dependency cozy-device-helper to v3
  • fix(deps): update dependency cozy-flags to v3
  • fix(deps): update dependency cozy-harvest-lib to v19
  • fix(deps): update dependency cozy-realtime to v5
  • fix(deps): update dependency cozy-sharing to v10
  • fix(deps): update dependency cozy-ui to v95
  • fix(deps): update dependency eslint-config-cozy-app to v6
  • fix(deps): update dependency eslint-plugin-prettier to v5
  • fix(deps): update dependency node to v18
  • fix(deps): update dependency prettier to v3
  • fix(deps): update dependency react-intl to v6
  • fix(deps): update dependency rxjs to v7
  • fix(deps): update dependency styled-components to v6
  • fix(deps): update dependency stylint to v2
  • fix(deps): update dependency url-search-params-polyfill to v8
  • fix(deps): update dependency utf-8-validate to v6
  • fix(deps): update jest monorepo to v29 (major) (babel-jest, jest, jest-environment-jsdom)
  • fix(deps): update react monorepo to v18 (major) (react, react-dom, react-test-renderer)
  • 🔐 Create all rate-limited PRs at once 🔐

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

npm
package.json
  • @atlaskit/icon 21.1.0
  • @atlaskit/media-core 32.2.0
  • @cozy/minilog ^1.0.0
  • @material-ui/core 4.12.3
  • @material-ui/styles 4.11.4
  • classnames 2.3.1
  • cozy-bar 7.19.1
  • cozy-client ^40.0.1
  • cozy-device-helper ^2.6.0
  • cozy-doctypes 1.86.1
  • cozy-editor-core 134.0.3
  • cozy-flags 2.8.4
  • cozy-harvest-lib 7.2.3
  • cozy-intent ^2.0.2
  • cozy-interapp ^0.8.1
  • cozy-logger ^1.9.0
  • cozy-realtime 4.0.5
  • cozy-scripts 8.0.1
  • cozy-sharing ^6.0.5
  • cozy-stack-client ^40.0.1
  • cozy-ui ^77.6.0
  • lodash 4.17.21
  • prop-types 15.8.1
  • react 16.14.0
  • react-dom 16.14.0
  • react-intl 2.9.0
  • react-router-dom 6.3.0
  • rooks 7.1.1
  • rxjs 5.5.12
  • styled-components 3.4.10
  • url-search-params-polyfill 7.0.1
  • utf-8-validate 5.0.8
  • @testing-library/jest-dom 5.16.5
  • @testing-library/react 12.1.4
  • @testing-library/react-hooks 8.0.1
  • babel-jest ^27.5.1
  • babel-preset-cozy-app ^2.0.2
  • bundlemon 1.4.0
  • eslint-config-cozy-app 4.2.1
  • eslint-plugin-prettier 3.4.0
  • eslint-plugin-react 7.24.0
  • git-directory-deploy 1.5.1
  • install-peers 1.0.3
  • jest 28.1.3
  • jest-environment-jsdom 28.1.3
  • prettier 1.19.1
  • react-test-renderer 16.14.0
  • redux-mock-store 1.5.4
  • stylint 1.5.9
  • prosemirror-model 1.11.0
  • @atlaskit/editor-tables 1.1.3
nvm
.nvmrc
  • node 16
travis
.travis.yml
  • node 16

  • Check this box to trigger a request for Renovate to run again on this repository

Test command is broken

The test command currently returns an error code 1, because no tests can be found.

I tried to add a dummy test, which it ran but then crashed with the error

TypeError: Expected a string

      at Object.<anonymous>.module.exports (node_modules/escape-string-regexp/index.js:7:9)
      at Object.<anonymous> (node_modules/chalk/index.js:72:39)

Note sure where this comes from, ansiStyles.color.close really is undefined on my machine, but I would say it's likely a dependency problem more than an actual problem in chalk.

Support for synchronising notes from iOS’ Notes app

This would be great for iOS users whom primarily use the default Notes application, allowing them to see their notes cross-platform with ease while having the latest tools iOS has to offer (like updates to Apple Pencil support).

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: undefined. Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.

Use new CozyClient method

We have done some mutualisation in CozyClient. We should this code in Notes.

  • NotesCollection.create()
  • remove prosemirror model dep
  • remove note schema

Use CSS Modules

Currently, on Cozy Notes, we don't use CSS modules. Once it's done, we should start to use named import instead of global

returnUrl queryParam is not in the right place in the url

Quand on ouvre une note depuis l'application, on a une url du type https://notes.cozy.wtf/?returnUrl=https%3A%2F%2Fnotes.cozy.wtf%2F#/n/1586afkd alors qu'on devrait avoir https://notes.cozy.wtf/#/n/1586afkd?returnUrl=https%3A%2F%2Fnotes.cozy.wtf%2F

Aujourd'hui le comportement est bon (cela fonctionne), mais l'url n'est pas construite correctement

index.css split

ATM, in our index.css, we have a lot of CSS. The majority of this CSS is here to override the one provided by prosemirror and a few lines is about our application.

We should split this file, with one CSS to override prosemirror and a stylus file to style our application.

WDYT?

Sharings

Mettre à jour cozy-sharings car aujourd'hui si on a plus de 30 partages par Lien et qu'on partage une note, on a de grande chance de ne plus voir que la note est partagée

Add rename note file feature

Add the ability to rename the note file from within the note app.

Right now it's derived from the title if you create the file from the note app, and you can't change it (or you do have to change the title). While if you go to cozy Drive, you can rename the file itself.

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.