diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 1b88fc3c66..f8619adc07 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -37,6 +37,7 @@ jobs: path: | packages/fuselage/storybook-static packages/fuselage-ui-kit/storybook-static + packages/onboarding-ui/storybook-static - if: github.ref == 'refs/heads/master' uses: actions/upload-artifact@v2 with: @@ -111,9 +112,10 @@ jobs: name: docs path: . - run: | - rm -rf "fuselage/${{ needs.build-and-test.outputs.branch-name }}" "fuselage-ui-kit/${{ needs.build-and-test.outputs.branch-name }}" + rm -rf "fuselage/${{ needs.build-and-test.outputs.branch-name }}" "fuselage-ui-kit/${{ needs.build-and-test.outputs.branch-name }}" "onboarding-ui/${{ needs.build-and-test.outputs.branch-name }}" mv -v "packages/fuselage/storybook-static" "fuselage/${{ needs.build-and-test.outputs.branch-name }}" mv -v "packages/fuselage-ui-kit/storybook-static" "fuselage-ui-kit/${{ needs.build-and-test.outputs.branch-name }}" + mv -v "packages/onboarding-ui/storybook-static" "onboarding-ui/${{ needs.build-and-test.outputs.branch-name }}" rm -rf packages - uses: crazy-max/ghaction-github-pages@v2 with: diff --git a/.github/workflows/ci-pr-closed.yml b/.github/workflows/ci-pr-closed.yml index fc3df33f5c..bb60ebccb0 100644 --- a/.github/workflows/ci-pr-closed.yml +++ b/.github/workflows/ci-pr-closed.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v2 with: ref: gh-pages - - run: rm -rf "fuselage/${{ github.event.number }}" "fuselage-ui-kit/${{ github.event.number }}" + - run: rm -rf "fuselage/${{ github.event.number }}" "fuselage-ui-kit/${{ github.event.number }}" "onboarding-ui/${{ github.event.number }}" - uses: crazy-max/ghaction-github-pages@v2 with: target_branch: gh-pages diff --git a/.github/workflows/ci-pr-opened.yml b/.github/workflows/ci-pr-opened.yml index 6ef2031d8d..1a449ba4c6 100644 --- a/.github/workflows/ci-pr-opened.yml +++ b/.github/workflows/ci-pr-opened.yml @@ -43,6 +43,7 @@ jobs: path: | fuselage/storybook-static fuselage-ui-kit/storybook-static + onboarding-ui/storybook-static publish-to-gh-pages: name: Publish to GitHub Pages @@ -61,9 +62,10 @@ jobs: name: storybooks path: packages - run: | - rm -rf "fuselage/${{ needs.download-artifact.outputs.pr-number }}" "fuselage-ui-kit/${{ needs.download-artifact.outputs.pr-number }}" + rm -rf "fuselage/${{ needs.download-artifact.outputs.pr-number }}" "fuselage-ui-kit/${{ needs.download-artifact.outputs.pr-number }}" "onboarding-ui/${{ needs.download-artifact.outputs.pr-number }}" mv -v packages/fuselage/storybook-static "fuselage/${{ needs.download-artifact.outputs.pr-number }}" mv -v packages/fuselage-ui-kit/storybook-static "fuselage-ui-kit/${{ needs.download-artifact.outputs.pr-number }}" + mv -v packages/onboarding-ui/storybook-static "onboarding-ui/${{ needs.download-artifact.outputs.pr-number }}" rm -rf packages - uses: crazy-max/ghaction-github-pages@v2 with: diff --git a/.github/workflows/ci-pr.yml b/.github/workflows/ci-pr.yml index 9a86a1b4cb..6d54264235 100644 --- a/.github/workflows/ci-pr.yml +++ b/.github/workflows/ci-pr.yml @@ -35,6 +35,7 @@ jobs: path: | packages/fuselage/storybook-static packages/fuselage-ui-kit/storybook-static + packages/onboarding-ui/storybook-static test-with-loki: name: Test with Loki @@ -63,11 +64,16 @@ jobs: - run: | cat packages/fuselage/package.json | sed s/\.docker/.app/ > packages/fuselage/package.json-new cat packages/fuselage-ui-kit/package.json | sed s/\.docker/.app/ > packages/fuselage-ui-kit/package.json-new + cat packages/onboarding-ui/package.json | sed s/\.docker/.app/ > packages/onboarding-ui/package.json-new mv packages/fuselage/package.json-new packages/fuselage/package.json mv packages/fuselage-ui-kit/package.json-new packages/fuselage-ui-kit/package.json + mv packages/onboarding-ui/package.json-new packages/onboarding-ui/package.json - uses: ./.github/actions/loki/test with: working_dir: ./packages/fuselage - uses: ./.github/actions/loki/test with: working_dir: ./packages/fuselage-ui-kit + - uses: ./.github/actions/loki/test + with: + working_dir: ./packages/onboarding-ui diff --git a/.vscode/settings.json b/.vscode/settings.json index 32ec2af5bc..9a9a01f2a2 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -40,6 +40,10 @@ "directory": "packages/mp3-encoder", "changeProcessCWD": true }, + { + "directory": "packages/onboarding-ui", + "changeProcessCWD": true + }, { "directory": "packages/peggy-loader", "changeProcessCWD": true diff --git a/README.md b/README.md index 9514cdca57..deaeb7c28e 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ | 📦 [`@rocket.chat/fuselage-ui-kit`](/packages/@rocket.chat/fuselage-ui-kit) | UiKit elements for Rocket.Chat Apps built under Fuselage design system | ![npm](https://img.shields.io/npm/v/@rocket.chat/fuselage-ui-kit?style=flat-square) | ![deps](https://img.shields.io/david/RocketChat/Rocket.Chat.Fuselage?path=packages%2Ffuselage-ui-kit&style=flat-square) | | 📦 [`@rocket.chat/icons`](/packages/@rocket.chat/icons) | | ![npm](https://img.shields.io/npm/v/@rocket.chat/icons?style=flat-square) | ![deps](https://img.shields.io/david/RocketChat/Rocket.Chat.Fuselage?path=packages%2Ficons&style=flat-square) | | 📦 [`@rocket.chat/image-manipulation`](/packages/@rocket.chat/image-manipulation) | Image transform functions | ![npm](https://img.shields.io/npm/v/@rocket.chat/image-manipulation?style=flat-square) | ![deps](https://img.shields.io/david/RocketChat/Rocket.Chat.Fuselage?path=packages%2Fimage-manipulation&style=flat-square) | +| 📦 [`@rocket.chat/image-manipulation`](/packages/@rocket.chat/image-manipulation) | Image transform functions | ![npm](https://img.shields.io/npm/v/@rocket.chat/image-manipulation?style=flat-square) | ![deps](https://img.shields.io/david/RocketChat/Rocket.Chat.Fuselage?path=packages%2Fimage-manipulation&style=flat-square) | | 📦 [`@rocket.chat/memo`](/packages/@rocket.chat/memo) | Memoization utilities | ![npm](https://img.shields.io/npm/v/@rocket.chat/memo?style=flat-square) | ![deps](https://img.shields.io/david/RocketChat/Rocket.Chat.Fuselage?path=packages%2Fmemo&style=flat-square) | | 📦 [`@rocket.chat/message-parser`](/packages/@rocket.chat/message-parser) | Rocket.Chat parser for messages | ![npm](https://img.shields.io/npm/v/@rocket.chat/message-parser?style=flat-square) | ![deps](https://img.shields.io/david/RocketChat/Rocket.Chat.Fuselage?path=packages%2Fmessage-parser&style=flat-square) | | 📦 [`@rocket.chat/mp3-encoder`](/packages/@rocket.chat/mp3-encoder) | A LAME encoder to be used in web workers | ![npm](https://img.shields.io/npm/v/@rocket.chat/mp3-encoder?style=flat-square) | ![deps](https://img.shields.io/david/RocketChat/Rocket.Chat.Fuselage?path=packages%2Fmp3-encoder&style=flat-square) | diff --git a/packages/eslint-config-alt/typescript/index.js b/packages/eslint-config-alt/typescript/index.js index 50066d1d8b..9a29bfe2af 100644 --- a/packages/eslint-config-alt/typescript/index.js +++ b/packages/eslint-config-alt/typescript/index.js @@ -18,6 +18,7 @@ module.exports = { argsIgnorePattern: '^_', }, ], + '@typescript-eslint/no-use-before-define': ['error'], 'func-call-spacing': 'off', 'indent': 'off', 'import/order': [ diff --git a/packages/fuselage/.loki/reference/chrome_iphone7_Forms_Inputs_SelectPaginated_PaginatedMultiSelect.png b/packages/fuselage/.loki/reference/chrome_iphone7_Forms_Inputs_SelectPaginated_PaginatedMultiSelect.png index 2b10e302cf..3da4a0ef17 100644 Binary files a/packages/fuselage/.loki/reference/chrome_iphone7_Forms_Inputs_SelectPaginated_PaginatedMultiSelect.png and b/packages/fuselage/.loki/reference/chrome_iphone7_Forms_Inputs_SelectPaginated_PaginatedMultiSelect.png differ diff --git a/packages/fuselage/.loki/reference/chrome_iphone7_Forms_Inputs_SelectPaginated_Select_with_filter_and_ellipses.png b/packages/fuselage/.loki/reference/chrome_iphone7_Forms_Inputs_SelectPaginated_Select_with_filter_and_ellipses.png index 8a9af283cc..9bf4674c28 100644 Binary files a/packages/fuselage/.loki/reference/chrome_iphone7_Forms_Inputs_SelectPaginated_Select_with_filter_and_ellipses.png and b/packages/fuselage/.loki/reference/chrome_iphone7_Forms_Inputs_SelectPaginated_Select_with_filter_and_ellipses.png differ diff --git a/packages/fuselage/.loki/reference/chrome_iphone7_Forms_Inputs_SelectPaginated_WithTitle.png b/packages/fuselage/.loki/reference/chrome_iphone7_Forms_Inputs_SelectPaginated_WithTitle.png new file mode 100644 index 0000000000..cb7adeb6b0 Binary files /dev/null and b/packages/fuselage/.loki/reference/chrome_iphone7_Forms_Inputs_SelectPaginated_WithTitle.png differ diff --git a/packages/fuselage/.loki/reference/chrome_laptop_Forms_Inputs_SelectPaginated_PaginatedMultiSelect.png b/packages/fuselage/.loki/reference/chrome_laptop_Forms_Inputs_SelectPaginated_PaginatedMultiSelect.png index 765c0f788a..41203e0b8f 100644 Binary files a/packages/fuselage/.loki/reference/chrome_laptop_Forms_Inputs_SelectPaginated_PaginatedMultiSelect.png and b/packages/fuselage/.loki/reference/chrome_laptop_Forms_Inputs_SelectPaginated_PaginatedMultiSelect.png differ diff --git a/packages/fuselage/.loki/reference/chrome_laptop_Forms_Inputs_SelectPaginated_Select_with_filter_and_ellipses.png b/packages/fuselage/.loki/reference/chrome_laptop_Forms_Inputs_SelectPaginated_Select_with_filter_and_ellipses.png index c1bc2a1461..5088a7858b 100644 Binary files a/packages/fuselage/.loki/reference/chrome_laptop_Forms_Inputs_SelectPaginated_Select_with_filter_and_ellipses.png and b/packages/fuselage/.loki/reference/chrome_laptop_Forms_Inputs_SelectPaginated_Select_with_filter_and_ellipses.png differ diff --git a/packages/fuselage/.loki/reference/chrome_laptop_Forms_Inputs_SelectPaginated_WithTitle.png b/packages/fuselage/.loki/reference/chrome_laptop_Forms_Inputs_SelectPaginated_WithTitle.png new file mode 100644 index 0000000000..c307f371f4 Binary files /dev/null and b/packages/fuselage/.loki/reference/chrome_laptop_Forms_Inputs_SelectPaginated_WithTitle.png differ diff --git a/packages/fuselage/README.md b/packages/fuselage/README.md index bcc66a45e3..b7b9371234 100644 --- a/packages/fuselage/README.md +++ b/packages/fuselage/README.md @@ -23,11 +23,11 @@ Firstly, install the peer dependencies (prerequisites): ```sh -npm i @rocket.chat/fuselage-hooks @rocket.chat/fuselage-polyfills @rocket.chat/icons react react-dom +npm i @rocket.chat/fuselage-hooks @rocket.chat/fuselage-polyfills @rocket.chat/icons react react-dom react-virtuoso # or, if you are using yarn: -yarn add @rocket.chat/fuselage-hooks @rocket.chat/fuselage-polyfills @rocket.chat/icons react react-dom +yarn add @rocket.chat/fuselage-hooks @rocket.chat/fuselage-polyfills @rocket.chat/icons react react-dom react-virtuoso ``` Add `@rocket.chat/fuselage` as a dependency: diff --git a/packages/fuselage/index.js b/packages/fuselage/index.js index 6762180279..404f133e02 100644 --- a/packages/fuselage/index.js +++ b/packages/fuselage/index.js @@ -1,5 +1,5 @@ -module.exports = require('./dist/fuselage.development.js'); -// if (process.env.NODE_ENV === 'production') { -// module.exports = require('./dist/fuselage.production.js'); -// } else { -// } +if (process.env.NODE_ENV === 'production') { + module.exports = require('./dist/fuselage.production.js'); +} else { + module.exports = require('./dist/fuselage.development.js'); +} diff --git a/packages/fuselage/src/components/Menu/index.d.ts b/packages/fuselage/src/components/Menu/index.d.ts index 764e444237..a5f318c076 100644 --- a/packages/fuselage/src/components/Menu/index.d.ts +++ b/packages/fuselage/src/components/Menu/index.d.ts @@ -9,10 +9,7 @@ type MenuProps = Omit, 'icon'> & { icon?: string; options: { [id: string]: { - label: { - title: string; - icon: string; - }; + label: ReactElement | string; action: () => void; }; }; diff --git a/packages/fuselage/src/components/Message/Metrics/index.tsx b/packages/fuselage/src/components/Message/Metrics/index.tsx index 7ea67d6da3..7e4aa6c7fe 100644 --- a/packages/fuselage/src/components/Message/Metrics/index.tsx +++ b/packages/fuselage/src/components/Message/Metrics/index.tsx @@ -11,12 +11,6 @@ const ContentItem: FC = (props) => (
); -export const Reply: FC> = (props) => ( - -