Skip to content

Commit

Permalink
Merge pull request #1 from gsoft-inc/feature/rename_to_orbiter
Browse files Browse the repository at this point in the history
rename package to orbiter
  • Loading branch information
alexasselin008 authored Oct 3, 2023
2 parents f1deae1 + fcc6d43 commit a4d83a1
Show file tree
Hide file tree
Showing 263 changed files with 639 additions and 2,922 deletions.
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [["@sharegate/orbit-ui", "@orbit-ui/components"]],
"linked": [["@workleap/orbiter-ui", "@orbit-ui/transition-components"]],
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch",
Expand Down
5 changes: 0 additions & 5 deletions .changeset/quick-bottles-chew.md

This file was deleted.

2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ module.exports = {
files: ["*.ts", "*.tsx"],
rules: {
"react/no-unused-prop-types": "off", // Issue with typescript
"@typescript-eslint/no-explicit-any": "off", // we use any a lot in orbit
"@typescript-eslint/no-explicit-any": "off", // we use any a lot in orbiter
"@typescript-eslint/ban-ts-comment": "off"
}
},
Expand Down
6 changes: 3 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request.
Before submitting your pull request, please:
1. Read our contributing documentation: https://github.com/gsoft-inc/sg-orbit/blob/master/CONTRIBUTING.md
1. Read our contributing documentation: https://github.com/gsoft-inc/wl-orbiter/blob/master/CONTRIBUTING.md
2. Ensure there are no linting or TypeScript errors: `yarn lint`
3. Verify that tests pass: `yarn jest`
-->

Issue:
Issue:

## Summary

Expand Down
2 changes: 1 addition & 1 deletion .storybook/components/github-link/getGithubUrl.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const GITHUB_REPOSITORY_URL = "https://github.com/gsoft-inc/sg-orbit/tree/master";
const GITHUB_REPOSITORY_URL = "https://github.com/gsoft-inc/wl-orbiter/tree/master";

export function getGithubUrl(relativePath: string) {
return `${GITHUB_REPOSITORY_URL}${relativePath.startsWith("/") ? relativePath : `/${relativePath}`}`;
Expand Down
8 changes: 3 additions & 5 deletions .storybook/components/preview/scopes.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as OrbitComponents from "@components";
import * as ExperimentalOrbitComponents from "@experimental";
import * as OrbiterComponents from "@components";
import { CheckeredBackground } from "@stories/components";
import { forwardRef, useCallback, useContext, useDebugValue, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useReducer, useRef, useState } from "react";
import { useFormik } from "formik";
Expand Down Expand Up @@ -29,9 +28,8 @@ const ThirdParties = {
};

export const KnownScope = {
...OrbitComponents,
...OrbiterComponents,
...React,
...DocsComponents,
...ThirdParties,
...ExperimentalOrbitComponents
...ThirdParties
};
7 changes: 2 additions & 5 deletions .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ if (includeDocs) {
// TODO simplify imports for any pkgs /docs/**/*.stories.mdx
"../docs/**/*.stories.mdx",
"../packages/icons/docs/**/*.stories.mdx",
"../packages/components/src/**/docs/**/*.stories.mdx",
"../packages/experimental/src/**/docs/**/*.stories.mdx"
"../packages/components/src/**/docs/**/*.stories.mdx"
];
}

Expand All @@ -20,9 +19,7 @@ if (includeChromatic) {
...stories,
// TODO remove chroma and simplify imports
"../packages/components/**/tests/chromatic/**/*.chroma.jsx",
"../packages/components/**/tests/chromatic/**/*.stories.tsx",
"../packages/experimental/**/tests/chromatic/**/*.chroma.tsx",
"../packages/experimental/**/tests/chromatic/**/*.stories.tsx"
"../packages/components/**/tests/chromatic/**/*.stories.tsx"
];
}

Expand Down
4 changes: 2 additions & 2 deletions .storybook/manager-head.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<link rel="shortcut icon" href="https://raw.githubusercontent.com/gsoft-inc/sg-orbit/master/assets/favicon.ico">
<link rel="icon" type="image/png" href="https://raw.githubusercontent.com/gsoft-inc/sg-orbit/master/assets/favicon.png" sizes="192x192">
<link rel="shortcut icon" href="https://raw.githubusercontent.com/gsoft-inc/wl-orbiter/master/assets/favicon.ico">
<link rel="icon" type="image/png" href="https://raw.githubusercontent.com/gsoft-inc/wl-orbiter/master/assets/favicon.png" sizes="192x192">
2 changes: 0 additions & 2 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import "@css/normalize.css";
import "@components/index.css";
import "@experimental/index.css";
import "./styles";

import { ShareGateTheme, createThemeVars } from "@components/styling";
Expand Down Expand Up @@ -38,7 +37,6 @@ export const parameters = {
],
"Layout",
"Components",
"Experimental",
"Content",
"Placeholders",
"Html elements",
Expand Down
4 changes: 2 additions & 2 deletions .storybook/styles/docs.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:root {
/* Use this var only when the element is not affected by the font-family specified in Storybook docs theme */
--orbit-font-family: "TT Interphases Variable", Arial, Helvetica, sans-serif;
--orbiter-font-family: "TT Interphases Variable", Arial, Helvetica, sans-serif;
}

/* LAYOUT */
Expand Down Expand Up @@ -96,7 +96,7 @@

.docblock-argstable-body button {
color: var(--o-ui-accent-6) !important;
font-family: var(--orbit-font-family) !important;
font-family: var(--orbiter-font-family) !important;
font-size: var(--o-ui-fs-2) !important;
padding-left: 2px !important;
}
Expand Down
4 changes: 2 additions & 2 deletions .storybook/styles/themes.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { create } from "@storybook/theming";
export const Themes = {
manager: create({
base: "light",
brandTitle: "ShareGate Orbit",
brandTitle: "ShareGate Orbiter",
brandUrl: "https://sharegate.com",
brandImage: "https://raw.githubusercontent.com/gsoft-inc/sg-orbit/master/assets/orbit-full.svg?sanitize=true"
brandImage: "https://raw.githubusercontent.com/gsoft-inc/wl-orbiter/master/assets/orbiter-full.svg?sanitize=true"
}),
docs: create({
base: "light",
Expand Down
5 changes: 2 additions & 3 deletions .storybook/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ function addWebpackAliases(config) {
"@root": path.resolve(__dirname, ".."),
"@css": path.resolve(__dirname, "../packages/css/src"),
"@components": path.resolve(__dirname, "../packages/components/src"),
"@orbit-ui/components": path.resolve(__dirname, "../packages/components/src"),
"@sharegate/orbit-ui": path.resolve(__dirname, "../packages/bundle/src"),
"@experimental": path.resolve(__dirname, "../packages/experimental/src"),
"@orbit-ui/transition-components": path.resolve(__dirname, "../packages/components/src"),
"@workleap/orbiter-ui": path.resolve(__dirname, "../packages/bundle/src"),
"@stories/components": path.resolve(__dirname, "./components"),
"@stories/mdx": path.resolve(__dirname, "./mdx"),
"@stories/utils": path.resolve(__dirname, "./utils")
Expand Down
34 changes: 17 additions & 17 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The following documentation is only for the maintainers of this repository.

## Monorepo setup

This repository is managed as a monorepo that is composed of many npm packages.
This repository is managed as a monorepo that is composed of many npm packages.

For more information on monorepo:

Expand All @@ -27,15 +27,15 @@ For more information on monorepo:

### Lerna

[Lerna](https://github.com/lerna/lerna) is used to manage this monorepo. The packages of the monorepo can be found in the [packages](/packages) directory.
[Lerna](https://github.com/lerna/lerna) is used to manage this monorepo. The packages of the monorepo can be found in the [packages](/packages) directory.

Since Yarn workspace feature offer native mono-repo capabilities and a seemless integration with Lerna this is our goto package manager for this project.

When Lerna is configured to use Yarn, the installation of the npm dependencies and the management of the packages inter-dependencies will be delegated to Yarn. It result in an increase of performance and a more reliable experience than using the same features from Lerna. The native integration between Lerna and Yarn make it worthwill to switch from npm to Yarn for this project.

So why do we use Lerna if Yarn workspace take care of everything?

Lerna workflow greatly facilitate the release of the packages of a monorepo.
Lerna workflow greatly facilitate the release of the packages of a monorepo.

For more information, read the following Lerna commands documentation:

Expand All @@ -58,7 +58,7 @@ This project use Yarn workspace. Therefore, you must install Yarn:

```
choco install yarn
```
```

For more options to install Yarn, view https://yarnpkg.com/lang/en/docs/install/#windows-stable.

Expand All @@ -78,7 +78,7 @@ The following documentation is a brief overview of the tools and processes invol

### Adding or modifying an icon

When adding a new icon in @orbit-ui/icons, you want to make sure that the @orbit-ui/components package is updated accordingly. You will need to generate
When adding a new icon in @orbit-ui/transition-icons, you want to make sure that the @orbit-ui/transition-components package is updated accordingly. You will need to generate
a new react component for that icon using the `yarn generate-icons-components` command.

### Storybook
Expand Down Expand Up @@ -117,10 +117,10 @@ Any updates to the packages or Storybook's stories will automatically re-compile

When you are ready to release the packages, you must follow the following steps:
1. Run `yarn new-version` to bump the version of the packages that have been updated since the previous release. You will be prompted to select the type of release (major, minor or patch) for each package and to enter release notes. If you prefer writing the release notes in a text editor, enter a placeholder line in the command line, and the you can modify the file generated before committing it.
2. Commit the newly generated file in your branch and submit a new Pull Request(PR). Changesets will automatically detect the changes and post a message in your pull request telling you that once the PR closes, the versions will be released.
2. Commit the newly generated file in your branch and submit a new Pull Request(PR). Changesets will automatically detect the changes and post a message in your pull request telling you that once the PR closes, the versions will be released.
3. Merge the Pull request into master. A Github action will automatically trigger and update the version of the packages and publish them to npm.
4. Create a new Github release associated to the tag created previously
5. Optionally deploy Storybook and the document Website
5. Optionally deploy Storybook and the document Website

### Alpha release

Expand Down Expand Up @@ -162,9 +162,9 @@ By default, packages compilation output will be in their respective *dist* direc

## Release docs

Orbit documentation is host on Netlify. 2 sites are available, a currated site for the official documentation (https://orbit.sharegate.design) and a raw site containing every Storybook stories (https://sg-storybook.netlify.com).
Orbiter documentation is host on Netlify. 2 sites are available, a currated site for the official documentation (https://wl-orbiter-website.netlify.app/) and a raw site containing every Storybook stories (https://sg-storybook.netlify.com).

Login to [Netlify](https://app.netlify.com) and make sure you have access to the **sg-orbit** and **sg-storybook** sites of the GSoft team.
Login to [Netlify](https://app.netlify.com) and make sure you have access to the **sg-orbiter** and **sg-storybook** sites of the GSoft team.

Netlify is configured to automatically deploy (unpublished) both sites everytime **a new commit is done in an opened PR** or **a PR is merged back into master**.

Expand Down Expand Up @@ -238,11 +238,11 @@ yarn reset
If you encounter the following error:

```bash
C:\Dev\20_gsoft\sg-orbit\node_modules\rimraf\bin.js:47
C:\Dev\20_gsoft\sg-orbiter\node_modules\rimraf\bin.js:47
throw er
^

[Error: EPERM: operation not permitted, unlink 'XXX\sg-orbit\node_modules\@types'] {
[Error: EPERM: operation not permitted, unlink 'XXX\sg-orbiter\node_modules\@types'] {
```
Close & re-open VSCode and delete manually the *node_modules* folder at the root of the workspace.
Expand Down Expand Up @@ -297,11 +297,11 @@ Visual testing assert on what visually appears on the screen instead of assertin
This is a more *black box* and *robust* testing approach since it shouldn't requires to modify the tests if the code refactor haven't change anything visually.
This approach is usually strictly use to assert that the visual of a component do not regress. Since it's easy and very efficient to write a robust test with this approach, we also use it to test the specifications of a component that are related to the behaviors and states.
This approach is usually strictly use to assert that the visual of a component do not regress. Since it's easy and very efficient to write a robust test with this approach, we also use it to test the specifications of a component that are related to the behaviors and states.
Therefore, prefer this approach to [interactions](#interaction-testing) and [api testing](#api-testing) when possible.
Setting all the tools to perform automated visual tests involve a lot of time and knowledge. Therefore, we bought a license of [Chromatic QA](https://www.chromaticqa.com). This is the perfect tool for us since it perfectly integrate with Storybook.
Setting all the tools to perform automated visual tests involve a lot of time and knowledge. Therefore, we bought a license of [Chromatic QA](https://www.chromaticqa.com). This is the perfect tool for us since it perfectly integrate with Storybook.
For access to our Chromatic QA environment, ask to join the [gsoft-inc](https://github.com/gsoft-inc) organization on Github.
Expand Down Expand Up @@ -532,7 +532,7 @@ For more information on the topic view the issue [https://github.com/testing-lib
### Netlify CI setup
To enable deploy previews on PR, Netlify sg-orbit and sg-storybook sites have been linked to the sg-orbit Github repository. Netlify will deploy a preview on every commits for any branches, even for master (which is Netlify production). This beging said, since the sites have been configured with "Auto Publish" disabled, even if a deploy is compiled for production IT IS NOT DEPLOY, it's only available for preview and must be deployed manually.
To enable deploy previews on PR, Netlify sg-orbiter and sg-storybook sites have been linked to the sg-orbiter Github repository. Netlify will deploy a preview on every commits for any branches, even for master (which is Netlify production). This beging said, since the sites have been configured with "Auto Publish" disabled, even if a deploy is compiled for production IT IS NOT DEPLOY, it's only available for preview and must be deployed manually.
Having disabled "Auto Publish" is also the reason why our script that publish our sites to production "doesn't work anymore". It still works, the reason why the site doesn't update is because the script will create a new production build but WILL NOT PUBLISH IT, since it's auto publishing is disabled. It must be published manually throught Netlify web interface.
Expand All @@ -542,15 +542,15 @@ The Storybook props tables somewhow doesn't play well if our types comes from an
### Updating Jest Snapshots
It's straightforward to spot when a snapshot test fails after a bug has been introduced. When that happens, go ahead and fix the issue and make sure your snapshot tests are passing again.
It's straightforward to spot when a snapshot test fails after a bug has been introduced. When that happens, go ahead and fix the issue and make sure your snapshot tests are passing again.
You can run the command
You can run the command
```bash
yarn jest --updateSnapshot -u FILENAME
```
So if you want to update the useStyledSystem.test.tsx file
So if you want to update the useStyledSystem.test.tsx file
```bash
yarn jest --updateSnapshot -u useStyledSystem.test.tsx
Expand Down
10 changes: 5 additions & 5 deletions PACKAGES_UPDATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ In a terminal, use the followings commands

Cannot update `eslint` to version 8. We get the following error when opening an MDX file.

[Error - 4:06:53 PM] Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/rules/no-unused-expressions' is not defined by "exports" in C:\Dev\gsoft\sg-orbit\node_modules\eslint\package.json
[Error - 4:06:53 PM] Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/rules/no-unused-expressions' is not defined by "exports" in C:\Dev\gsoft\sg-orbiter\node_modules\eslint\package.json
at throwExportsNotFound (internal/modules/esm/resolve.js:290:9)
at packageExportsResolve (internal/modules/esm/resolve.js:513:3)
at resolveExports (internal/modules/cjs/loader.js:439:36)
Expand All @@ -25,7 +25,7 @@ Cannot update `eslint` to version 8. We get the following error when opening an
at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
at Module.require (internal/modules/cjs/loader.js:1006:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (C:\Dev\gsoft\sg-orbit\node_modules\eslint-plugin-mdx\lib\rules\no-unused-expressions.js:7:57)
at Object.<anonymous> (C:\Dev\gsoft\sg-orbiter\node_modules\eslint-plugin-mdx\lib\rules\no-unused-expressions.js:7:57)

## Meow & Chalk

Expand All @@ -34,7 +34,7 @@ Cannot update `charlk` to version 5.

FYI: I think this problem is solvable on our side and should be investigated.

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: C:\Dev\gsoft\sg-orbit\node_modules\meow\index.js
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: C:\Dev\gsoft\sg-orbiter\node_modules\meow\index.js
require() of ES modules is not supported.
require() of C:\Dev\gsoft\sg-orbit\node_modules\meow\index.js from C:\Dev\gsoft\sg-orbit\scripts\copy-root-license.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from C:\Dev\gsoft\sg-orbit\node_modules\meow\package.json.
require() of C:\Dev\gsoft\sg-orbiter\node_modules\meow\index.js from C:\Dev\gsoft\sg-orbiter\scripts\copy-root-license.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from C:\Dev\gsoft\sg-orbiter\node_modules\meow\package.json.
Loading

0 comments on commit a4d83a1

Please sign in to comment.