v2.1.8
  • Get Started
  • Components
  • Composables
  • Typography
  • GitHub
  • Overview
  • Introduction
  • Installation
  • Installation
  • Migration
  • Contribution
  • Theme
  • Design System
  • CSS Variables
  • Components
  • Integrations
  • Icons
  • Icons
  • Color Mode
  • Color Mode
  • I18n
  • I18n
  • Content
  • AI Tools
  • MCP Server
  • LLMs.txt
  • b24icons
  • b24jssdk
Use our Nuxt starter
v2.1.8
  • Docs
  • Components
  • Composables
  • Typography

Contribution

A detailed guide on how to contribute to Bitrix24 UI, including insights on project structure, development workflow, and best practices.

The goal of this project is to provide components identical to Bitrix24 to enhance the user experience and simplify the development of applications for Bitrix24.

We have chosen Nuxt UI as the foundation. We welcome your contributions in the form of bug reports, pull requests, and feedback to make this library even better.

Before reporting a bug or requesting a feature, make sure that you have read through our documentation and existing issues.

Project structure

Here's an overview of the key directories and files in the Bitrix24 UI project structure:

Documentation

The documentation lives in the docs folder as a Nuxt app using @nuxt/content to generate pages from Markdown files. See the Nuxt Content documentation for details on how it works. Here's a breakdown of its structure:

├── app/
│   ├── assets/
│   ├── components/
│   │   └── content/
│   │       └── examples   # Components used in documentation as examples
│   ├── composables/
│   └── ...
├── content/
│   ├── 1.getting-started
│   ├── 2.composables
│   └── 3.components       # Components documentation

Module

The module code resides in the src folder. Here's a breakdown of its structure:

├── plugins/
├── runtime/
│   ├── components/     # Where all the components are located
│   │   ├── Accordion.vue
│   │   ├── Alert.vue
│   │   └── ...
│   ├── composables/
│   ├── locale/
│   ├── plugins/
│   ├── types/
│   ├── utils/
│   └── vue/
│       ├── components/
│       └── plugins/
├── theme/              # This where the theme for each component is located
│   ├── accordion.ts    # Theme for Accordion component
│   ├── alert.ts
│   └── ...
└── module.ts

Submit a Pull Request (PR)

Before you start, check if there's an existing issue describing the problem or feature request you're working on. If there is, please leave a comment on the issue to let us know you're working on it.

If there isn't, open a new issue to discuss the problem or feature.

Local development

To begin local development, follow these steps:

Clone the @bitrix24/b24ui-nuxt repository to your local machine

git clone https://github.com/bitrix24/b24ui.git

Enable Corepack

corepack enable

Install dependencies

pnpm install

Generate type stubs

pnpm run dev:prepare

Start development

  • To work on the documentation located in the docs folder, run:
pnpm run docs
  • To test the Nuxt components using the playground, run:
pnpm run dev
  • To test the Vue components using the playground, run:
pnpm run dev:vue

IDE Setup

We recommend using VSCode alongside the ESLint extension. You can enable auto-fix and formatting when saving your code. Here's how:

{
  "editor.codeActionsOnSave": {
    "source.fixAll": false,
    "source.fixAll.eslint": true
  }
}
Since ESLint is already configured to format the code, there's no need for duplicating functionality with Prettier. If you have it installed in your editor, we recommend disabling it to avoid conflicts.

Linting

You can use the lint command to check for linting errors:

pnpm run lint # check for linting errors
pnpm run lint:fix # fix linting errors

Type checking

We use TypeScript for type checking. You can use the typecheck command to check for type errors:

pnpm run typecheck

Testing

Before submitting a PR, ensure that you run the tests for both nuxt and vue:

pnpm run test # for Nuxt
pnpm run test:vue # for Vue
If you have to update the snapshots, press u after the tests have finished running.

Commit conventions

We use Conventional Commits for commit messages, which allows a changelog to be auto-generated based on the commits. Please read the guide through if you aren't familiar with it already.

  • Use fix and feat for code changes that affect functionality or logic
  • Use docs for documentation changes and chore for maintenance tasks

Making a Pull Request

  • Follow along the instructions provided when creating a PR
  • Ensure your PR's title adheres to the Conventional Commits since it will be used once the code is merged.
  • Multiple commits are fine; no need to rebase or force push. We'll use Squash and Merge when merging.
  • Ensure lint, typecheck and tests work before submitting the PR. Avoid making unrelated changes.

Thanks!

Migration

A comprehensive guide to migrate your application from Bitrix24 UI v1 to Bitrix24 UI v2.

Design System

Bitrix24 UI's design system uses Tailwind CSS for simple theming and easy customization.

On this page

  • Project structure
    • Documentation
    • Module
  • Submit a Pull Request (PR)
    • Local development
    • IDE Setup
    • Linting
    • Type checking
    • Testing
    • Commit conventions
    • Making a Pull Request
Releases
Published under MIT License.

Copyright © 2024-present Bitrix24