Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Chem-Generic-UI Changelog

## [2.2.0]
> 2026-03-25

### Features and Enhancements
- `Overview Map`: provides a visual dashboard at the top of your form to track data entry progress and streamline navigation
- Auto-expand the first group by default.
- Refined wording across the UI for clarity.

### Bug Fixes
- Fixed an issue where templates could not be saved as drafts after being imported into the Work Area.

### Chores
- Migrated build tooling to **Vite**.
- Configured external dependencies with conditional minify and sourcemap options for builds.
- Bumped GitHub Actions versions to resolve the Node.js 20 deprecation warnings.
- Dependency upgrades.

## [2.1.1]

### Security
Expand Down
84 changes: 84 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@

# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [chemotion-labimotion@lists.kit.edu]. All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of actions.

**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at [https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
91 changes: 91 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Contributing to chem-generic-ui

Thanks for your interest in contributing. This document explains how to set up the project, propose changes, and submit pull requests.

## Code of Conduct

This project follows the [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you agree to uphold it.

## Prerequisites

- Node.js `>=21.0.0 <25.0.0` (see [package.json](package.json))
- Yarn (a `yarn.lock` is committed; please use Yarn for dependency installs)
- Git

## Getting Started

```bash
git clone https://github.com/ComPlat/chem-generic-ui.git
cd chem-generic-ui
yarn install
```

## Common Scripts

| Script | Purpose |
|--------|---------|
| `yarn build` | Production build via Vite |
| `yarn build:d` | Development build |
| `yarn test` | Run Vitest suite once (verbose) |
| `yarn test:watch` | Run Vitest in watch mode |

## Branching

- Base your work on the active development branch (currently `main`).
- Use a descriptive branch name, e.g. `feat/short-description`, `fix/short-description`, `chore/short-description`.

## Commit Messages

Follow [Conventional Commits](https://www.conventionalcommits.org/):

```
<type>(<scope>): <short summary>
```

Common types: `feat`, `fix`, `chore`, `docs`, `refactor`, `test`, `perf`, `build`, `ci`.

Keep the subject under ~72 characters. Use the body to explain *why* when not obvious.

## Coding Standards

- Lint with the project ESLint config (`eslint.config.js`).
- Format with Prettier; respect existing style.
- Do not commit generated `dist/` artifacts in feature PRs unless the change is a release.
- Keep changes focused — avoid mixing refactors with feature work.

## Tests

- Add or update Vitest tests for any behavior change.
- Run `yarn test` before opening a PR; all tests must pass.

## Pull Requests

1. Fork the repo and push your branch.
2. Open a PR against the active development branch.
3. Fill in the PR description: motivation, summary of changes, screenshots for UI changes, and a test plan.
4. Link related issues (`Fixes #123`).
5. Address review feedback with new commits; squash on merge if requested by maintainers.

A PR is ready when:

- [ ] Tests pass locally (`yarn test`)
- [ ] Lint is clean
- [ ] No unrelated changes
- [ ] Docs updated

## Reporting Bugs

Open a GitHub issue with:

- chem-generic-ui version
- Node version, OS, browser
- Reproduction steps and expected vs. actual behavior
- Minimal repro or code snippet when possible

## Feature Requests

Open an issue describing the use case and proposed API. Discuss before implementing large changes.

## License

By contributing, you agree your contributions are licensed under the project's [AGPL-3.0 License](LICENSE).
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ or Yarn:
yarn add chem-generic-ui
```

## Contributing

Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for setup instructions, coding standards, commit conventions, and the pull request workflow.

## Support and Community

If you have questions, comments, or suggestions, the best place to share them is in the [Discussions](https://github.com/LabIMotion/chem-generic-ui/discussions) section. We welcome your feedback and participation!
105 changes: 105 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
const js = require('@eslint/js');
const { FlatCompat } = require('@eslint/eslintrc');
const babelParser = require('@babel/eslint-parser');
const prettier = require('eslint-plugin-prettier');
const prettierConfig = require('eslint-config-prettier');
const react = require('eslint-plugin-react');
const reactHooks = require('eslint-plugin-react-hooks');
const jest = require('eslint-plugin-jest');
const jestDom = require('eslint-plugin-jest-dom');
const importPlugin = require('eslint-plugin-import');
const jsxA11y = require('eslint-plugin-jsx-a11y');
const globals = require('globals');

const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
});

module.exports = [
js.configs.recommended,
...compat.extends('airbnb'),
{
files: ['**/*.{js,jsx}'],
languageOptions: {
parser: babelParser,
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
requireConfigFile: false,
babelOptions: {
presets: ['@babel/preset-react'],
},
},
globals: {
...globals.browser,
...globals.node,
...globals.jest,
},
},
plugins: {
import: importPlugin,
react,
prettier,
jest,
'jest-dom': jestDom,
'react-hooks': reactHooks,
'jsx-a11y': jsxA11y,
},
settings: {
react: {
version: 'detect',
},
'import/resolver': {
alias: {
map: [
['@', './src'],
['@assets', './src/assets'],
['@components', './src/components'],
['@models', './src/models'],
['@schemas', './src/schemas'],
['@utils', './src/utils'],
['@ui', './src/ui'],
['@root', '.'],
],
extensions: ['.js', '.jsx'],
},
},
},
rules: {
'max-len': [1, 100, 2, { ignoreComments: true }],
'no-console': ['off'],
'comma-dangle': [1, 'only-multiline'],
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }],
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
'prettier/prettier': [
'error',
{
arrowParens: 'always',
},
],
'prefer-destructuring': ['error', { object: true, array: false }],
'jest-dom/prefer-checked': 'error',
'jest-dom/prefer-enabled-disabled': 'error',
'jest-dom/prefer-required': 'error',
'jest-dom/prefer-to-have-attribute': 'error',
...react.configs.recommended.rules,
...reactHooks.configs.recommended.rules,
...jest.configs.recommended.rules,
...jestDom.configs.recommended.rules,
},
},
prettierConfig,
{
ignores: [
'node_modules/**',
'dist/**',
'coverage/**',
'build/**',
'*.config.js',
],
},
];
Loading
Loading