@jdfed/drip-table v1.0.1
Drip-Table Development Guide
Drip-Table
is the core library of the solution for building dynamic tables. It's main ability is to render a dynamic table automatically when received data which conforms to the JSON Schema
standard.
Directory
- update continually
├── src // Source code
│ ├── components // Common components that drip-table depends on
│ │ ├── DripForm // drip-form wrapper
│ │ ├── ErrorBoundary // Error notification component
│ │ ├── Highlight // Highlight component
│ │ ├── RichText // HTML-character-rendering component
│ ├── dtc // built-in common components
│ │ ├── image // Picture-display component
│ │ ├── link // Link-operation component
│ │ ├── render-html // Custom-LowCode component
│ │ ├── text // Text-display component
│ │ ├── components.ts // common type definition
│ │ ├── index.ts // export
│ ├── card.css // styles of card
│ ├── context.ts // export global Context
│ ├── drip-table-provider.tsx // entry
│ ├── drip-table.module.css // global styles
│ ├── drip-table.ts // table app root element
│ ├── field.tsx // cell framework
│ ├── header.tsx // header of table
│ ├── hooks.ts // global states
│ ├── index.ts // export
│ ├── shims-styles.d.ts // style type definition
│ ├── shims-window.d.ts // global variations definition
│ ├── types.ts // export type definition
│ ├── utils.ts
│ ├── virtual-list.ts // virtual scrollable list
├── .fatherrc.js // father-build configuration
├── .gitignore
├── .npmrc
├── .prettierignore
├── .prettierrc
├── package.json
├── tsconfig.json
Development
Steps
- create a new branch that names to express the features simply.
- coding in local branch.
- add documents of new features in
docs/drip-table
directory. - add features in
docs/drip-table/changelog
file. - submit code and merge into
master
branch. - modify version infomation in
package.json
file. - submit and push code.
- release new version.
Cautions
- Use React.memo to wrap a functional component, and compare props to update the wrapped component.
- Merge related states instead of using too many useStates.
- Do not use arrow functions to assgin to event functions as values directly. (Reference: How to read an often-changing value from useCallback?)
- Either class component or functional component while definiting a component as much as possible.
Release
add owner in npm depository for the first time.
npm owner add [username] @jdfed/drip-table
Version number modification rules
Major version number(1): Required. Modify when there are major changes in the functional modules, such as adding multiple modules or changing the architecture. Whether to modify this version number is determined by the project manager.
Sub version number(1): Required. Modify when the function has a certain increase or change, such as adding authority management, adding custom views, etc. Whether to modify this version number is determined by the project manager.
Phase version number(1): Required. Generally, a revised version is released when a bug is fixed or a small change is made. The time interval is not limited. When a serious bug is fixed, a revised version can be released. Whether to modify this version number is determined by the project manager.
Date version number(051021): Optional. The date version number is used to record the date of the modification of the project, and the modification needs to be recorded every day. Whether to modify this version number is determined by developers.
Greek letter version number(beta): Optional. This version number is used to mark which pharse of development the current software is in, and it needs to be modified when the software enters to another pharse. Whether to modify this version number is determined by the project manager.
# GIT
git commit -m 'drip-table v1.1.1'
# build
yarn run build:drip-table
# release
npm publish