Skip to content

Commit

Permalink
Merge branch 'master' of github.com:dxc-technology/halstack-react int…
Browse files Browse the repository at this point in the history
…o Mil4n0r/tooltip-actionicon
  • Loading branch information
Mil4n0r committed Jul 11, 2024
2 parents ff910ef + 7c6ae2a commit 906fe61
Show file tree
Hide file tree
Showing 2,145 changed files with 56,453 additions and 92,387 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/check-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,4 @@ jobs:

- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@v1
with:
args: . --exclude app
uses: lycheeverse/lychee-action@v1
15 changes: 8 additions & 7 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ on:
branches:
- master
paths:
- "lib/**"
- "packages/lib/**"
pull_request:
paths:
- "lib/**"
- "packages/lib/**"

jobs:
chromatic-deployment:
Expand All @@ -19,8 +19,8 @@ jobs:
with:
fetch-depth: 0

- name: Install lib dependencies
run: cd lib && npm install
- name: Install dependencies
run: npm install

- name: Install Node.js 18.x
uses: actions/setup-node@v1
Expand All @@ -35,11 +35,12 @@ jobs:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
exitOnceUploaded: true
exitZeroOnChanges: true
workingDir: lib
workingDir: packages/lib

- name: Run Storybook Tests
run: |
cd lib
cd packages/lib
npx playwright install --with-deps
npm run storybook:accessibility:ci
env:
TARGET_URL: "${{ steps.chromatic_publish.outputs.storybookUrl }}"
TARGET_URL: "${{ steps.chromatic_publish.outputs.storybookUrl }}"
35 changes: 13 additions & 22 deletions .github/workflows/publish-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- master
paths:
- "lib/**"
- "packages/lib/**"

jobs:
build:
Expand All @@ -31,36 +31,27 @@ jobs:
role-duration-seconds: 3600
role-skip-session-tagging: true

- name: Install lib dependencies
run: cd lib && npm install --omit=dev

- name: Install lib babel dependency
run: cd lib && npm install --D @babel/core

- name: Build library
run: cd lib && npm run build

- name: Install website dependencies
run: cd website && npm i

- name: Install dependencies
run: npm install

- name: Build library and website
run: SITE_VERSION=next npm run build

- name: Test library
run: cd lib && npm run test

run: npm run test
- name: Test library accessibility
run: cd lib && npm run test:accessibility

- name: Build website
run: cd website && SITE_VERSION=next npm run build
run: npm run test:accessibility

- name: Publish NEXT version to npm
run: |
sed -i "s#\"version\": \"0.0.0\"#\"version\": \"0.0.0-${GITHUB_SHA:0:7}\"#" ./dist/package.json
cd dist
sed -i "s#\"version\": \"0.0.0\"#\"version\": \"0.0.0-${GITHUB_SHA:0:7}\"#" ./packages/lib/package.json
cd packages/lib
npm publish --tag next --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}

- name: Move NEXT website to S3
run: |
aws s3 rm s3://design-system-react-cdk-site/halstack/next/ --recursive
aws s3 cp ./website/out/ s3://design-system-react-cdk-site/halstack/next/ --recursive
aws s3 cp ./apps/website/out/ s3://design-system-react-cdk-site/halstack/next/ --recursive
28 changes: 11 additions & 17 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,22 @@ jobs:
role-duration-seconds: 3600
role-skip-session-tagging: true

- name: Install lib dependencies
run: cd lib && npm install --omit=dev

- name: Install lib babel dependency
run: cd lib && npm install --D @babel/core

- name: Build library
run: cd lib && npm run build

- name: Install website dependencies
run: cd website && npm i

- name: Install dependencies
run: npm install

- name: Build library and website
run: npm run build

- name: Test library
run: cd lib && npm run test

run: npm run test
- name: Test library accessibility
run: cd lib && npm run test:accessibility
run: npm run test:accessibility

- name: Publish RELEASE to npm
run: |
sed -i "s#\"version\": \"0.0.0\"#\"version\": \"${TAG_NAME}\"#" ./dist/package.json
cd dist
sed -i "s#\"version\": \"0.0.0\"#\"version\": \"${TAG_NAME}\"#" ./packages/lib/package.json
cd packages/lib
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/publish-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- master
paths:
- "website/**"
- "apps/website/**"

jobs:
build:
Expand All @@ -32,12 +32,12 @@ jobs:
role-skip-session-tagging: true

- name: Install website dependencies
run: cd website && npm i
run: npm install

- name: Build library
run: cd website && SITE_VERSION=next npm run build
- name: Build website
run: SITE_VERSION=next npm run build

- name: Move website to S3
run: |
aws s3 rm s3://design-system-react-cdk-site/halstack/next/ --recursive
aws s3 cp ./website/out/ s3://design-system-react-cdk-site/halstack/next/ --recursive
aws s3 cp ./apps/website/out/ s3://design-system-react-cdk-site/halstack/next/ --recursive
18 changes: 6 additions & 12 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,14 @@ jobs:
node-version: 18.x
registry-url: https://registry.npmjs.org/

- name: Install lib dependencies
run: cd lib && npm install
- name: Install dependencies
run: npm install

- name: Build library
run: cd lib && npm run build

- name: Install website dependencies
run: cd website && npm i
- name: Build library and website
run: npm run build

- name: Test library
run: cd lib && npm run test
run: npm run test

- name: Test library accessibility
run: cd lib && npm run test:accessibility

- name: Build website
run: cd website && npm run build
run: npm run test:accessibility
45 changes: 42 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,42 @@
app/cypress/snapshots/detailed-visual-regression.js/__diff_output__/
/node_modules
/dist
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# Dependencies
node_modules
.pnp
.pnp.js

# Local env files
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# Testing
coverage

# Turbo
.turbo

# Vercel
.vercel

# Build Outputs
.next/
out/
build
dist


# Debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Misc
.DS_Store
*.pem

# Storybook
*storybook.log
storybook-static
Empty file added .npmrc
Empty file.
File renamed without changes.
23 changes: 10 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
# Contributing Guidelines

Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional
documentation, we greatly value feedback and contributions from our community.
Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional documentation, we greatly value feedback and contributions from our community.

Please read through this document before submitting any issues or pull requests to ensure we have all the necessary
information to effectively respond to your bug report or contribution.
Please read through this document before submitting any issues or pull requests to ensure we have all the necessary information to effectively respond to your bug report or contribution.

Before contributing, please read our [contribution guidelines](https://github.com/dxc-technology/halstack-react/wiki/Contributing).

## Reporting Bugs/Feature Requests

We welcome you to use the GitHub issue tracker to report bugs or suggest features.

When filing an issue, please check existing open or recently closed, issues to make sure somebody else hasn't already
reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:
When filing an issue, please check existing open or recently closed, issues to make sure somebody else hasn't already reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:

* A reproducible test case or series of steps
* The version of our code being used
* Any modifications you've made relevant to the bug
* Anything unusual about your environment or deployment


## Contributing via Pull Requests

Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:

1. You are working against the latest source on the *staging* branch.
Expand All @@ -34,18 +32,17 @@ To send us a pull request, please:
3. Ensure local tests pass.
4. Commit to your fork using clear commit messages.
5. Send us a pull request merging into the *staging* branch, answering any default questions in the pull request interface.
6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.

GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).
6. CI pipelines will fail since this is a fork. We will manually run the CI pipeline on the PR after reviewing the code and give feedback if needed.

GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and [creating a pull request](https://help.github.com/articles/creating-a-pull-request/).

## Finding contributions to work on
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels ((enhancement/bug/duplicate/help wanted/invalid/question/wontfix).

Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix).

## Security issue notifications
If you discover a potential security issue in this project we ask that you notify DXC Technology Security via email. Please do **not** create a public github issue.

If you discover a potential security issue in this project we ask that you notify DXC Technology Security via email. Please do **not** create a public github issue.

## Licensing

Expand Down
68 changes: 68 additions & 0 deletions LOCAL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<p align="center">
<a href="https://developer.dxc.com/halstack/">
<img src="apps/website/screens/common/images/halstack_logo.svg" alt="Halstack Design System logo" />
</a>
</p>

<h1 align="center">Local environment</h1>

Halstack has become a monorepo, so the development environment has changed. Now, the library and the example application are in the same repository, and the library is built and linked to the example application.

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

## Before start working

Remember to read [the documentation site](https://developer.dxc.com/halstack/) carefully before trying to modify any Halstack implementation, documentation or examples.

## Monorepo structure

The monorepo is structured as follows (some folders and files are omitted for explanation purposes):

```bash
📂 apps
📂 website # Contains our Next.js documentation site application
📂 packages
📂 cloudscape-themed # Contains Cloudscape components themed by Halstack
📂 lib # Contains halstack-react component library
📄 package.json # Root package.json
📄 package-lock.json # Root package-lock.json
📄 turbo.json # <turbo> command configuration file
```

There are two main folders here:

- `apps`: Contains website and any other future Halstack-related app.
- `packages`: Contains all the libraries that Halstack is composed of.

## Getting Started

Install the dependencies of the project:

```bash
npm install
```

Install turbo globally so you can conveniently run turbo commands in your terminal from anywhere in your repository:

```bash
npm install turbo --global
```

In any case, all the commands can be run using `npm run` instead of `turbo`.

## Commands

Here is a list of the most common commands you will use:

- `turbo build` - Build the library.
- `turbo dev` - Start the development server.
- `turbo format` - Run the Prettier formatter.
- `turbo lint` - Run the linter.
- `turbo storybook` - Start the Storybook server.
- `turbo storybook:accessibility` - Run the accessibility tests on Storybook.
- `turbo storybook:accessibility:ci` - Run the accessibility tests on Storybook in CI mode.
- `turbo storybook:build` - Build the Storybook.
- `turbo storybook:deploy` - Deploy the Storybook to GitHub Pages.
- `turbo test` - Run the tests.
- `turbo test:accessibility` - Run the accessibility tests.
- `turbo test:watch` - Run the tests in watch mode.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<p align="center">
<a href="https://developer.dxc.com/halstack/">
<img src="website/screens/common/images/halstack_logo.svg" alt="Halstack Design System logo" />
<img src="apps/website/screens/common/images/halstack_logo.svg" alt="Halstack Design System logo" />
</a>
</p>

Expand Down
Binary file removed UI-kits/latest/UI_kit_Halstack_v4.3.1.xd
Binary file not shown.
Binary file removed UI-kits/v2/UI-Kit_Halstack_v2.0.xd
Binary file not shown.
Binary file removed UI-kits/v3/UI Kit-Halstack_v3.0.0.xd
Binary file not shown.
Binary file removed UI-kits/v3/UI Kit-Halstack_v3.1.0.xd
Binary file not shown.
Binary file removed UI-kits/v3/UI Kit-Halstack_v3.1.1.xd
Binary file not shown.
Binary file removed UI-kits/v3/UI Kit-Halstack_v3.1.2.xd
Binary file not shown.
Binary file removed UI-kits/v3/UI Kit-Halstack_v3.2.0.xd
Binary file not shown.
Binary file removed UI-kits/v3/UI Kit-Halstack_v3.3.0.xd
Binary file not shown.
Binary file removed UI-kits/v3/UI Kit-Halstack_v3.4.0.xd
Binary file not shown.
Binary file removed UI-kits/v3/UI Kit-Halstack_v3.5.0.xd
Binary file not shown.
Binary file removed UI-kits/v3/UI Kit-Halstack_v3.6.0.xd
Binary file not shown.
Binary file removed UI-kits/v3/UI_kit_Halstack_v3.10.0.xd
Binary file not shown.
Binary file removed UI-kits/v3/UI_kit_Halstack_v3.11.0.xd
Binary file not shown.
Binary file removed UI-kits/v3/UI_kit_Halstack_v3.12.0.xd
Binary file not shown.
Binary file removed UI-kits/v3/UI_kit_Halstack_v3.13.0.xd
Binary file not shown.
Binary file removed UI-kits/v3/UI_kit_Halstack_v3.14.0.xd
Binary file not shown.
Binary file removed UI-kits/v3/UI_kit_Halstack_v3.7.0.xd
Binary file not shown.
Binary file removed UI-kits/v3/UI_kit_Halstack_v3.8.0.xd
Binary file not shown.
Binary file removed UI-kits/v3/UI_kit_Halstack_v3.9.0.xd
Binary file not shown.
Binary file removed UI-kits/v4/UI_kit_Halstack_v4.0.0.xd
Binary file not shown.
Binary file removed UI-kits/v4/UI_kit_Halstack_v4.1.0.xd
Binary file not shown.
Binary file removed UI-kits/v4/UI_kit_Halstack_v4.2.0.xd
Binary file not shown.
Binary file removed UI-kits/v4/UI_kit_Halstack_v4.3.0.xd
Binary file not shown.
Loading

0 comments on commit 906fe61

Please sign in to comment.