@evolver-fi/evolver-basics v1.0.2
Evolver frontend modules
This is a repository that contains libraries for Evolver frontend common use cases.
Usage
yarn add @evolver-fi/evolver-basics
run yarn storybook
to see documentation about the individual components
Message log component
This is a frontend component that enables easy setup of log message views in an application with Evolver basics backend.
The component provides ready made views for
- Message log list
- Message details
Triggers component
This component supports listing and running Evolver backend triggerables. Also actions for those are exported for use in other places.
Scheduled tasks component
Management and triggering of scheduled tasks.
CRUD components
Frontend components for CRUD operations of DB entities. Requires a corresponding CRUD controller in
Development
New features and bugs should be tracked as issues in the evolver-front-modules repo. Review by the Evolver frontend team. Slack channel #fugu gets updates for PRs.
Testing
There are tests that use the Storybook to compare the rendered components both visually and as serialized DOM snapshots. To run the tests use
yarn test
The test report can be inspected under test-results
directory which contains a generated HTML report.
Release process:
- develop feature on a branch starting from main
- once finished, create PR to main. Remember Storybook example! Also make sure that all tests pass.
- When new stories are added, test snapshots should be generated and added to git. use
yarn update-snapshots
to generate the new snapshots and add them to git in a separate commit. Remember to build the static storybook instance withyarn build-storybook
- When new stories are added, test snapshots should be generated and added to git. use
- after review merge PR
- Create a new release:
- pull the main branch
- run
make release
Develop without deploying the lib to NPM
To develop the library locally without needing to deploy the library after changes:
- run
yarn link
in the root folder of this project - run
yarn link @evolver-fi/evolver-basics
in the root folder of the app project that is using the library. The project needs to have react, react-dom and react-redux as dependencies. - Symlink the
react
,react-dom
andreact-redux
,@mui
and@emotion
directories from under the App project's node_modules into the library's:
cd evolver-front-modules/node_modules
ln -s $APP_PROJECT_DIR/node_modules/react .
ln -s $APP_PROJECT_DIR/node_modules/react-dom .
ln -s $APP_PROJECT_DIR/node_modules/react-redux .
ln -s $APP_PROJECT_DIR/node_modules/@mui .
ln -s $APP_PROJECT_DIR/node_modules/@emotion .
- Run
yarn cache clean && yarn
in the main app project - Run
yarn dev
in the evolver-front-modules project Do NOT runyarn
oryarn install
in the evolver-front-modules as it will overwrite the linked react modules!
If there are problems still
rm -rf $APP_PROJET_DIR/.next/cache
where $APP_PROJECT_DIR is the project directory of the main app project could help.