Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: LEAP-452: FE Repo Modernization / Monorepo #5154

Merged
merged 108 commits into from
Jan 4, 2024
Merged

Conversation

juliosgarbi
Copy link
Contributor

PR fulfills these requirements

  • Commit message(s) and PR title follows the format [fix|feat|ci|chore|doc]: TICKET-ID: Short description of change made ex. fix: DEV-XXXX: Removed inconsistent code usage causing intermittent errors
  • Tests for the changes have been added/updated (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)
  • Best efforts were made to ensure docs/code are concise and coherent (checked for spelling/grammatical errors, commented out code, debug logs etc.)
  • Self-reviewed and ran all changes on a local instance (for bug fixes/features)

Change has impacts in these area(s)

(check all that apply)

  • Product design
  • Backend (Database)
  • Backend (API)
  • Frontend

Describe the reason for change

The proposed change involves transitioning LabelStudio's frontend code from a multi-repository structure to a single mono-repository. This shift aims to simplify the existing setup by consolidating various repositories into one focused mono-repo. The orchestration and tooling of this new structure will be efficiently managed by NX.dev, a platform well-suited for mono-repo architectures. This move is expected to streamline development processes, reduce the need for repetitive tasks and complex configurations, and significantly lower the maintenance burden. Overall, this transition is designed to enhance the efficiency and manageability of LabelStudio's frontend codebase.

What libraries were added/updated?

NX.dev

What alternative approaches were there?

One viable alternative approach for managing the frontend codebase was to utilize Turborepo, a modern build system optimized for JavaScript and TypeScript environments, especially in mono-repository contexts. However, following extensive discussions and collaborative deliberations with the entire frontend team, the decision was ultimately made to adopt NX.dev. This choice was based on a thorough evaluation of both platforms, considering various factors such as functionality, team familiarity, integration capabilities, and overall alignment with LabelStudio's project goals and long-term development strategy.

Does this PR introduce a breaking change?

(check only one)

  • Yes, and covered entirely by feature flag(s)
  • Yes, and covered partially by feature flag(s)
  • No
  • Not sure (briefly explain the situation below)
  • Yes, and covered by env variable. To make the monorepo works you must set ENABLE_MONOREPO_ENV=1

juliosgarbi and others added 30 commits September 28, 2023 11:24
* fix: LEAP-1: Start migration to monorepo

* Fix assets and useEffects returning

* add new rules to svg

* remove duplicated assets

* add back frontend folder

* get old build

* add back deleted files

* remove diffs

* remove default eslint rc

* Remove package-lock, update yarn.lock

* Remove yarnrc with wrong release

* move files from label_studio/frontend to web/apps

* remove files from frontend folder

* fix package.json

* fix yarn.lock

* fix assets and bem after move files

---------

Co-authored-by: hlomzik <hlomzik@gmail.com>
* fix: LEAP-1: Start migration to monorepo

* Fix assets and useEffects returning

* add new rules to svg

* remove duplicated assets

* feat: Move datamanager into the monorepo

* add datamanager into ls repo

* update datamanager

* fix some packages that was missing

* Update web/.env.example

Co-authored-by: yyassi-heartex <104568407+yyassi-heartex@users.noreply.github.com>

---------

Co-authored-by: yyassi-heartex <104568407+yyassi-heartex@users.noreply.github.com>
* fix: LEAP-1: Start migration to monorepo

* Fix assets and useEffects returning

* add new rules to svg

* remove duplicated assets

* feat: Move datamanager into the monorepo

* add datamanager into ls repo

* feat: LEAP-53: Move editor into the monorepo

* migrate editor to monorepo

* add some new packages and try to add different webpack configs

* add submodules

* remove github folder

* add submodules as folders

* Adjust docker config to work with monorepo

* merge conflicts

* Fix js libraries paths

* delete npmrc file

* update gitignore to add the files that shouldn't be on git

* delete gitignore

* add watch for libs

* add env.build and unification of webpack config

* add env.build

---------

Co-authored-by: Nick Skriabin <nr@fenelon.ru>
* feat: LEAP-324: Return builds and source files to LS monorepo

* remove source files

* fix icons

* fix output file

* remove examples

* change output

* change output and add examples
* fix: LEAP-347: LSF running as standalone app

* config editor to work standalone
* feat: LEAP-54: Move editor e2e tests to the new LS monorepo

* move e2e folder to test folder
#5043)

* chore: LEAP-50: Update makefile to work with current state of monorepo

* Refactoring

Co-authored-by: bmartel <brandonmartel@gmail.com>

* Refactoring

Co-authored-by: bmartel <brandonmartel@gmail.com>

* Keep frontend-fetch for potentional commented rollback

---------

Co-authored-by: bmartel <brandonmartel@gmail.com>
…sts work (#5051)

* feat: LEAP-54: Move editor e2e tests to the new LS monorepo

* feat: LEAP-239: Move ls-frontend-test to monorepo and make cypress tests work

* add cypress

* move e2e folder to test folder

* remove nx cypress and config default cypress

* add the frontend-test as a lib

* add frontend-test as a lib

* fix cypress tests

* remove dev build

* delete package lock
…n tests (#5052)

* feat: LEAP-54: Move editor e2e tests to the new LS monorepo

* feat: LEAP-239: Move ls-frontend-test to monorepo and make cypress tests work

* add cypress

* move e2e folder to test folder

* remove nx cypress and config default cypress

* add the frontend-test as a lib

* add frontend-test as a lib

* fix cypress tests

* remove dev build

* delete package lock

* feat: LEAP-56: Update package scripts to run units e2e and integration tests

* remove dist folder

* remove nx cloud

* merge conflicts

* clear commands
…tructure and the monorepo setup (#5058)

feat: LEAP-325: ADd mechanist to switch between current structure and monorepo
* [submodules] Copy src HumanSignal/dm2

Workflow run: https://github.com/HumanSignal/label-studio/actions/runs/6948415494

* [submodules] Build static HumanSignal/dm2

Workflow run: https://github.com/HumanSignal/label-studio/actions/runs/6948415494

---------

Co-authored-by: Nikita Belonogov <nikita.belonogov@humansignal.com>
* feat: LEAP-379: Add docs to monorepo

* fix typos
* [submodules] Copy src HumanSignal/dm2

Workflow run: https://github.com/HumanSignal/label-studio/actions/runs/6959725389

* [submodules] Build static HumanSignal/dm2

Workflow run: https://github.com/HumanSignal/label-studio/actions/runs/6959725389

* fix: LEAP-409: Update files to match with monorepo

* [submodules] Copy src HumanSignal/dm2

Workflow run: https://github.com/HumanSignal/label-studio/actions/runs/6960200640

* [submodules] Build static HumanSignal/dm2

Workflow run: https://github.com/HumanSignal/label-studio/actions/runs/6960200640

* fix editor changing the index name and merging diffs

---------

Co-authored-by: Julio Sgarbi <julio.sgarbi@hotmail.com>
* [submodules] Build static HumanSignal/label-studio-frontend

Workflow run: https://github.com/HumanSignal/label-studio/actions/runs/6970505860

* docs: LSF Update

Workflow run: https://github.com/HumanSignal/label-studio/actions/runs/6970505860

* [submodules] Copy src HumanSignal/label-studio-frontend

Workflow run: https://github.com/HumanSignal/label-studio/actions/runs/6971479552

* [submodules] Build static HumanSignal/label-studio-frontend

Workflow run: https://github.com/HumanSignal/label-studio/actions/runs/6971479552

---------

Co-authored-by: Nikita Belonogov <nikita.belonogov@humansignal.com>
@farioas
Copy link
Member

farioas commented Dec 14, 2023

/docker build

Workflow run
Docker image was pushed with the tag ``

@farioas
Copy link
Member

farioas commented Dec 14, 2023

/docker build

Workflow run
Docker image was pushed with the tag 20231214.165007-fb-leap-452-ab7da4770

@juliosgarbi
Copy link
Contributor Author

juliosgarbi commented Dec 19, 2023

/git merge develop

Workflow run

@nikitabelonogov nikitabelonogov merged commit ca09b8f into develop Jan 4, 2024
8 checks passed
@nikitabelonogov nikitabelonogov deleted the fb-leap-452 branch February 2, 2024 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants