chore: OPTIC-1956: Refactor all component blocks and pages from core to app-common lib #7367
+412
−9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several significant changes to the LabelStudio clientside application, focusing on coding standards, best practices, and project structure. The most important changes are grouped by theme below:
Coding Standards and Best Practices
.cursorrules/react.mdc
: Added a comprehensive set of React coding standards and best practices, covering project structure, component structure, hooks, state management, performance, tooling, forms, error handling, testing, accessibility, and code organization..cursorrules/tailwind.mdc
: Defined Tailwind CSS and UI component best practices, including component styling, tokens, layout, typography, colors, components, responsive design, performance, and general best practices..cursorrules/typescript.mdc
: Established TypeScript coding standards and best practices, focusing on the type system, naming conventions, code organization, functions, best practices, error handling, and design patterns.Codebase Refactoring
web/apps/labelstudio/src/pages/CreateProject/Import/Import.jsx
: Changed the import path forSampleDatasetSelect
from@humansignal/core
to@humansignal/app-common
.web/apps/labelstudio/src/pages/Organization/PeoplePage/PeoplePage.jsx
: Updated the import path forTokenSettingsModal
from@humansignal/core
to@humansignal/app-common
.web/apps/labelstudio/src/pages/index.js
: Modified the import path forpages
from@humansignal/core
to@humansignal/app-common
.New Library Setup
web/libs/app-common/.babelrc
: Added Babel configuration for the newapp-common
library.web/libs/app-common/README.md
: Created a README file for theapp-common
library.web/libs/app-common/jest.config.ts
: Configured Jest for theapp-common
library.web/libs/app-common/package.json
: Added a package.json file for theapp-common
library.web/libs/app-common/project.json
: Defined project settings and targets for theapp-common
library.File Renaming and Reorganization
web/libs/app-common/src/blocks/TokenSettingsModal/index.tsx
: Renamed and moved theTokenSettingsModal
component fromcore
toapp-common
.web/libs/app-common/src/index.ts
: Created an index file to export pages from theapp-common
library.