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

Split mono-repo in different npm packages #1543

Merged
merged 43 commits into from
Jun 21, 2023
Merged

Split mono-repo in different npm packages #1543

merged 43 commits into from
Jun 21, 2023

Conversation

anders-kiaer
Copy link
Collaborator

@anders-kiaer anders-kiaer commented Jun 8, 2023

Partially solves #1493.

  • Move component source code to separate folders. @anders-kiaer
  • Split runtime dependencies in current single package.json into each components package.json. @anders-kiaer
  • Use lerna nx @anders-kiaer
  • One single tsconfig.json in root folder (looks like this is not fully possible Set TypeScript compiler's base/working directory microsoft/TypeScript#25430, but we can put most of the config in the root folder by extending it in each package). @anders-kiaer
  • Keep dev-dependencies in root for consistency across packages (?). @anders-kiaer
  • Ensure build of common components runs to completion... i.e. npx nx build group-tree or npx nx run group-tree:build (and subsurface-viewer, well-completions, well-log-viewer) @hkfb
  • Ensure generated packages are usable... still need to find how to generate publishable libraries :/
  • Rename top-folder from /react to /typescript.

After discussion with @hkfb we think that we will postpone the following three tasks to a later PR:

  • Adjust storybook setup such that we can keep ONE storybook to publish containing stories of all the components.
  • Adjust CI setup to succeed with new structure.
  • Adjust Dash build setup to work with nx and multiple packages.
  • Remove unused (dev)dependencies in root workspace package.json

@anders-kiaer anders-kiaer self-assigned this Jun 12, 2023
@anders-kiaer anders-kiaer force-pushed the splitpackages branch 2 times, most recently from 1905cc3 to c17e3aa Compare June 15, 2023 08:48
@w1nklr
Copy link
Collaborator

w1nklr commented Jun 19, 2023

there is still a react/src/lib directories holding files. I guess these need to be handled and dispatched to the corresponding workspaces.

@anders-kiaer anders-kiaer marked this pull request as ready for review June 21, 2023 20:40
@anders-kiaer anders-kiaer merged commit 16d3539 into master Jun 21, 2023
@anders-kiaer anders-kiaer deleted the splitpackages branch June 21, 2023 20:43
nilscb added a commit that referenced this pull request Jun 26, 2023
…1552)

* Refactor Map.tsx to be more efficient with use of hooks (useRef)

* Refactor Map.tsx to be more efficient with use of hooks (useRef)

* Fix scaling with arrow keys. Had to split one useEffect into two; one for changes in layers and one for changes to scaling.

* Uppdate tests.

* Just changed the order of the effect

* Split mono-repo in different `npm` packages (#1543)

* Refactor Map.tsx to be more efficient with use of hooks (useRef)

* Fix scaling with arrow keys. Had to split one useEffect into two; one for changes in layers and one for changes to scaling.

* Uppdate tests.

* Just changed the order of the effect

* Refactor Map.tsx to be more efficient with use of hooks (useRef)

* Fix scaling with arrow keys. Had to split one useEffect into two; one for changes in layers and one for changes to scaling.

* Uppdate tests.

* Just changed the order of the effect

* Refactor Map.tsx to be more efficient with use of hooks (useRef)

* Fix scaling with arrow keys. Had to split one useEffect into two; one for changes in layers and one for changes to scaling.

* Just changed the order of the effect

* fix inculde path

* Restore storybook (#1563)

* Restored example-data for storybook.

* Fixed staticDirs reference in storybook config.

* Fixed story paths.

* Fixed references to example-data directory.

* Fixed storybook staticDirs reference.

* Try to prevent package build race condition.

* Fixed package transpilations.

---------

Co-authored-by: Havard Bjerke <[email protected]>

* Refactor Map.tsx to be more efficient with use of hooks (useRef)

* Fix scaling with arrow keys. Had to split one useEffect into two; one for changes in layers and one for changes to scaling.

* Uppdate tests.

* Just changed the order of the effect

* Refactor Map.tsx to be more efficient with use of hooks (useRef)

* Fix scaling with arrow keys. Had to split one useEffect into two; one for changes in layers and one for changes to scaling.

* Uppdate tests.

* Just changed the order of the effect

* Refactor Map.tsx to be more efficient with use of hooks (useRef)

* Fix scaling with arrow keys. Had to split one useEffect into two; one for changes in layers and one for changes to scaling.

* Just changed the order of the effect

* fix inculde path

* Refactor Map.tsx to be more efficient with use of hooks (useRef)

* Fix scaling with arrow keys. Had to split one useEffect into two; one for changes in layers and one for changes to scaling.

* Just changed the order of the effect

* Fix include

---------

Co-authored-by: Anders Fredrik Kiær <[email protected]>
Co-authored-by: Håvard Bjerke <[email protected]>
Co-authored-by: Havard Bjerke <[email protected]>
nilscb added a commit that referenced this pull request Jun 27, 2023
* Fix of "Prevent nested ternaries in the code #1526"

* Added comment to explain rule settings

* Use "error" in stead of number 2 in rule.

* Split mono-repo in different `npm` packages (#1543)

* Restore storybook (#1563)

* Restored example-data for storybook.

* Fixed staticDirs reference in storybook config.

* Fixed story paths.

* Fixed references to example-data directory.

* Fixed storybook staticDirs reference.

* Try to prevent package build race condition.

* Fixed package transpilations.

---------

Co-authored-by: Havard Bjerke <[email protected]>

* Refactor Map.tsx to be more efficient with use of hooks (useEffect) (#1552)

* Refactor Map.tsx to be more efficient with use of hooks (useRef)

* Refactor Map.tsx to be more efficient with use of hooks (useRef)

* Fix scaling with arrow keys. Had to split one useEffect into two; one for changes in layers and one for changes to scaling.

* Uppdate tests.

* Just changed the order of the effect

* Split mono-repo in different `npm` packages (#1543)

* Refactor Map.tsx to be more efficient with use of hooks (useRef)

* Fix scaling with arrow keys. Had to split one useEffect into two; one for changes in layers and one for changes to scaling.

* Uppdate tests.

* Just changed the order of the effect

* Refactor Map.tsx to be more efficient with use of hooks (useRef)

* Fix scaling with arrow keys. Had to split one useEffect into two; one for changes in layers and one for changes to scaling.

* Uppdate tests.

* Just changed the order of the effect

* Refactor Map.tsx to be more efficient with use of hooks (useRef)

* Fix scaling with arrow keys. Had to split one useEffect into two; one for changes in layers and one for changes to scaling.

* Just changed the order of the effect

* fix inculde path

* Restore storybook (#1563)

* Restored example-data for storybook.

* Fixed staticDirs reference in storybook config.

* Fixed story paths.

* Fixed references to example-data directory.

* Fixed storybook staticDirs reference.

* Try to prevent package build race condition.

* Fixed package transpilations.

---------

Co-authored-by: Havard Bjerke <[email protected]>

* Refactor Map.tsx to be more efficient with use of hooks (useRef)

* Fix scaling with arrow keys. Had to split one useEffect into two; one for changes in layers and one for changes to scaling.

* Uppdate tests.

* Just changed the order of the effect

* Refactor Map.tsx to be more efficient with use of hooks (useRef)

* Fix scaling with arrow keys. Had to split one useEffect into two; one for changes in layers and one for changes to scaling.

* Uppdate tests.

* Just changed the order of the effect

* Refactor Map.tsx to be more efficient with use of hooks (useRef)

* Fix scaling with arrow keys. Had to split one useEffect into two; one for changes in layers and one for changes to scaling.

* Just changed the order of the effect

* fix inculde path

* Refactor Map.tsx to be more efficient with use of hooks (useRef)

* Fix scaling with arrow keys. Had to split one useEffect into two; one for changes in layers and one for changes to scaling.

* Just changed the order of the effect

* Fix include

---------

Co-authored-by: Anders Fredrik Kiær <[email protected]>
Co-authored-by: Håvard Bjerke <[email protected]>
Co-authored-by: Havard Bjerke <[email protected]>

* Z scaling fix (#1555)

* Refactor Map.tsx to be more efficient with use of hooks (useRef)

* Fix scaling with arrow keys. Had to split one useEffect into two; one for changes in layers and one for changes to scaling.

* Just changed the order of the effect

* Refactor Map.tsx to be more efficient with use of hooks (useRef)

* Fix scaling with arrow keys. Had to split one useEffect into two; one for changes in layers and one for changes to scaling.

* Just changed the order of the effect

* Refactor Map.tsx to be more efficient with use of hooks (useRef)

* Fix scaling with arrow keys. Had to split one useEffect into two; one for changes in layers and one for changes to scaling.

* Just changed the order of the effect

* fix inculde path

* Refactor Map.tsx to be more efficient with use of hooks (useRef)

* Fix scaling with arrow keys. Had to split one useEffect into two; one for changes in layers and one for changes to scaling.

* Just changed the order of the effect

* Refactor Map.tsx to be more efficient with use of hooks (useRef)

* Fix scaling with arrow keys. Had to split one useEffect into two; one for changes in layers and one for changes to scaling.

* Just changed the order of the effect

* Refactor Map.tsx to be more efficient with use of hooks (useRef)

* Fix scaling with arrow keys. Had to split one useEffect into two; one for changes in layers and one for changes to scaling.

* Just changed the order of the effect

* Refactor Map.tsx to be more efficient with use of hooks (useRef)

* Fix scaling with arrow keys. Had to split one useEffect into two; one for changes in layers and one for changes to scaling.

* Just changed the order of the effect

* fix inculde path

* Refactor Map.tsx to be more efficient with use of hooks (useRef)

* Fix scaling with arrow keys. Had to split one useEffect into two; one for changes in layers and one for changes to scaling.

* Just changed the order of the effect

* Fix include

* Fix of "The Z scaling in webviz is slightly off initially. #1554"

* Updated test snapshots.

* Updated test snapshots.

* Fix of "[NGRM] - Visual artifacts shown after setting incorrect matri… (#1547)

* Refactor Map.tsx to be more efficient with use of hooks (useRef)

* Fix scaling with arrow keys. Had to split one useEffect into two; one for changes in layers and one for changes to scaling.

* Uppdate tests.

* Just changed the order of the effect

* Refactor Map.tsx to be more efficient with use of hooks (useRef)

* Fix scaling with arrow keys. Had to split one useEffect into two; one for changes in layers and one for changes to scaling.

* Uppdate tests.

* Just changed the order of the effect

* Refactor Map.tsx to be more efficient with use of hooks (useRef)

* Fix scaling with arrow keys. Had to split one useEffect into two; one for changes in layers and one for changes to scaling.

* Just changed the order of the effect

* fix inculde path

* Refactor Map.tsx to be more efficient with use of hooks (useRef)

* Fix scaling with arrow keys. Had to split one useEffect into two; one for changes in layers and one for changes to scaling.

* Just changed the order of the effect

* Refactor Map.tsx to be more efficient with use of hooks (useRef)

* Fix scaling with arrow keys. Had to split one useEffect into two; one for changes in layers and one for changes to scaling.

* Just changed the order of the effect

* Refactor Map.tsx to be more efficient with use of hooks (useRef)

* Fix scaling with arrow keys. Had to split one useEffect into two; one for changes in layers and one for changes to scaling.

* Just changed the order of the effect

* Refactor Map.tsx to be more efficient with use of hooks (useRef)

* Fix scaling with arrow keys. Had to split one useEffect into two; one for changes in layers and one for changes to scaling.

* Just changed the order of the effect

* fix inculde path

* Refactor Map.tsx to be more efficient with use of hooks (useRef)

* Fix scaling with arrow keys. Had to split one useEffect into two; one for changes in layers and one for changes to scaling.

* Just changed the order of the effect

* Fix include

* Fix of "The Z scaling in webviz is slightly off initially. #1554"

* Updated test snapshots.

* Updated test snapshots.

* Fix of "[NGRM] - Visual artifacts shown after setting incorrect matrix layout size number #1477"

* Changed error to warning.

* Fix of "[NGRM] - Visual artifacts shown after setting incorrect matrix layout size number #1477"

* Fix of "[NGRM] - Visual artifacts shown after setting incorrect matrix layout size number #1477"

* Small fix

* Migrate to Storybook 7 (#1568)

* Upgrade storybook to latest.

* Updated storybook config.

* Migrate to Storybook v7.

* Bump to latest color-tables.

* Removed @storybook/react-vite dependency.

---------

Co-authored-by: Havard Bjerke <[email protected]>

* Deploy storybook on merge to `master` (#1570)

* Fix of "Crash in story "ViewMatrixMargin" #1571" (#1572)

* Fix of "Prevent nested ternaries in the code #1526"

* Added comment to explain rule settings

* Use "error" in stead of number 2 in rule.

---------

Co-authored-by: Anders Fredrik Kiær <[email protected]>
Co-authored-by: Håvard Bjerke <[email protected]>
Co-authored-by: Havard Bjerke <[email protected]>
@hkfb
Copy link
Collaborator

hkfb commented Sep 20, 2023

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@hkfb hkfb added the released label Sep 20, 2023
@hkfb
Copy link
Collaborator

hkfb commented Sep 20, 2023

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@hkfb
Copy link
Collaborator

hkfb commented Sep 21, 2023

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@hkfb
Copy link
Collaborator

hkfb commented Sep 21, 2023

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@hkfb
Copy link
Collaborator

hkfb commented Sep 22, 2023

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@hkfb
Copy link
Collaborator

hkfb commented Sep 22, 2023

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@hkfb
Copy link
Collaborator

hkfb commented Sep 22, 2023

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

1 similar comment
@hkfb
Copy link
Collaborator

hkfb commented Sep 22, 2023

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@hkfb
Copy link
Collaborator

hkfb commented Sep 22, 2023

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@hkfb
Copy link
Collaborator

hkfb commented Sep 22, 2023

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@hkfb
Copy link
Collaborator

hkfb commented Dec 12, 2023

🎉 This issue has been resolved in version [email protected] 🎉

The release is available on GitHub release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants