Skip to content

Commit

Permalink
chore: marge feat/react-18
Browse files Browse the repository at this point in the history
  • Loading branch information
simonguo committed Sep 29, 2022
2 parents 90cb40e + c3648ac commit c3c7d24
Show file tree
Hide file tree
Showing 161 changed files with 4,710 additions and 3,585 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/nodejs-ci.yml
Expand Up @@ -25,6 +25,7 @@ jobs:
strategy:
matrix:
browser: [ChromeCi, Firefox]
react: ['React17', 'React18']

steps:
- uses: actions/checkout@v2
Expand All @@ -44,13 +45,24 @@ jobs:
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
- name: Install dependencies
run: npm ci
run: npm install

- name: install react 17
if: ${{ matrix.react == 'React17' }}
run: npm run install:react-17

- name: install react 18
if: ${{ matrix.react == 'React18' }}
run: npm run install:react-18

- name: Run headless tests
run: xvfb-run --auto-servernum npm test
env:
CI: true
BROWSER: ${{ matrix.browser }}

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
Expand Down
13 changes: 9 additions & 4 deletions docs/components/PageContent.tsx
Expand Up @@ -57,20 +57,25 @@ const PageContent = (props: PageContentProps) => {
{pageHead}
{fragments.map((item, index) => {
const result = item.match(/include:`(\S+)`(\|(\d+)\|)?/);

// Import sample code
const codeName = result?.[1];
const fileName = result?.[1];
const height = result?.[3];

if (codeName) {
if (fileName) {
const path =
'https://github.com/rsuite/rsuite/tree/master/docs/pages' +
`${pathname}/fragments/${fileName}`;

return (
<CustomCodeView
key={index}
sandboxFiles={sandboxFiles}
sandboxDependencies={sandboxDependencies}
height={height ? parseInt(height) : undefined}
source={require(`../pages${pathname}/fragments/${codeName}`)}
source={require(`../pages${pathname}/fragments/${fileName}`)}
dependencies={dependencies}
path={`https://github.com/rsuite/rsuite/tree/master/docs/pages${pathname}/fragments/${codeName}`}
path={path}
/>
);
}
Expand Down
1 change: 1 addition & 0 deletions docs/locales/en-US/index.ts
Expand Up @@ -46,6 +46,7 @@ export default {
shareTwitter: 'Share on Twitter',
accessibility: 'Accessibility',
composition: 'Composition',
performance: 'Optimizing Performance',
examples: 'Example Projects',
searchComponents: 'Search in components',
theme: 'Theme',
Expand Down
1 change: 1 addition & 0 deletions docs/locales/zh-CN/index.ts
Expand Up @@ -45,6 +45,7 @@ export default {
shareTwitter: '分享到 Twitter',
accessibility: '无障碍设计',
composition: '组件封装',
performance: '性能优化',
examples: '示例项目',
searchComponents: '搜索组件',
theme: '主题',
Expand Down
276 changes: 0 additions & 276 deletions docs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c3c7d24

Please sign in to comment.