Go to file
Clément CREUSAT 7a4b5212d9 Merged in bugfix/add-hook-to-webapp (pull request #76)
fix: add custom hook useEditor to webapp package

* fix: add custom hook useEditor to webapp package
2023-11-24 18:39:11 +00:00
.husky Fix pre-commit 2023-01-13 23:12:18 -08:00
.yarn/releases Add missing dependency 2023-01-04 18:54:46 -08:00
dist Add missing dependency 2023-01-04 18:54:46 -08:00
packages Merged in bugfix/add-hook-to-webapp (pull request #76) 2023-11-24 18:39:11 +00:00
.dockerignore Merged in feature/tests-and-docs (pull request #9) 2021-12-17 02:13:54 +00:00
.gitignore Migrate web2d to typescript 2023-02-10 02:51:52 +00:00
.nvmrc Revert to v16 version 2022-10-05 18:11:20 -07:00
.prettierignore adding basic config for prettier 2021-02-22 22:17:44 -08:00
.prettierrc.json Merged in ray-develop (pull request #51) 2022-07-09 01:34:52 +00:00
.yarnrc.yml Update to yarn 3. 2023-01-04 18:23:09 -08:00
bitbucket-pipelines.yml Fix compilation. 2023-01-04 21:32:13 -08:00
CONTRIBUTING.md Merged in feature/tests-and-docs (pull request #9) 2021-12-17 02:13:54 +00:00
docker-compose.snapshots.update.yml Update cypress version. 2023-07-31 21:44:54 -07:00
docker-compose.snapshots.yml Update cypress version. 2023-07-31 21:44:54 -07:00
jsconfig.json Migrate web2d to storybook 2023-01-30 04:10:57 +00:00
lerna.json feat(lerna): manage repo with lerna 7 and update dependencies 2023-06-26 15:42:34 +02:00
package.json Update yarn.lock 2023-07-02 09:54:22 -07:00
README.md Merged in bugfix/update-readme-file (pull request #72) 2023-06-30 13:13:29 +00:00
webpack.common.js Migrate web2d to typescript 2023-02-10 02:51:52 +00:00
yarn.lock Merged in feature/custom-hook-editor (pull request #74) 2023-11-21 03:00:11 +00:00

WiseMapping Frond End

WiseMapping Frond End is part of the MindMap Open Source Project. The first release of WiseMapping was in 2010 and there was not mayor update on the architecture. In 2021, a major change started with the goal to provide a visual and technology refresh of the project.

WiseMapping Front extracts all the UI related aspects in this repository. You will find three major modules:

  • Web2D: Lighway abstraction over SVG for chart renderding.
  • Mindplot: Pure vanilla ES6 classes responsible for providing mindmap rendering and edition capabilities.
  • Webapp: REACT application that encompass the whole midnmap edition experience.

Getting started

Make sure you have NodeJs installed (version compatible with package.json engine), and yarn installed (npm i -g yarn).

nvm use
yarn install

Please refer to each package's Readme.md for anything specific to the package.

If you want to contribute, please check out CONTRIBUTING.md.

Useful scripts

Each package might provide the following scripts.
You can run these for all packages by running it from the root folder. Alternatively you can run it for a specific package by passing the --scope option.

build

Production builds

yarn build

lint

run eslint

yarn lint

playground

start a devServer with some browsable examples

yarn playground --scope @wisemapping/web2d yarn playground --scope @wisemapping/mindplot

test

run all the tests

yarn test

run only integration tests

yarn test:integration

run only unit tests

yarn test:unit

Image Snapshot Testing

We use cypress-image-snapshot for snapshot testing. This is a relatively cheap way of identifying behavior changes based on page screenshots. See visual testing docs for more information.

When a test that contains a matchImageSnapshot call is run, it compares the snapshot to the corresponding one in the snapshots directory. If Any change is detected, the test will fail, and the diff can be found in the cypress/snapshots/*/__diff_output__ folder. If the change is intentional, we should "accept" those changes by updating the snapshot and include it in the commit.

There is a caveat where colors, fonts or ui may differ depending on the host machine running the tests.

A workaround for this is to run the tests using docker. Make sure you have docker and docker-compose installed.

Run snapshot tests: docker-compose -f docker-compose.snapshots.yml up
If anything changed, and the change was intentional, update the snapshots and then commit the new images to source control.
Update snapshots: docker-compose -f docker-compose.snapshots.update.yml up