Skip to content

Commit f81f743

Browse files
authored
Merge branch 'master' into devin-ai/convert-ts-nav-button-1740441688
2 parents 18c007c + e5004f7 commit f81f743

File tree

700 files changed

+16939
-15255
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

700 files changed

+16939
-15255
lines changed

.circleci/config.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 2.1
33
executors:
44
default:
55
docker:
6-
- image: cimg/node:18.18
6+
- image: cimg/node:20.18
77
user: root
88
resource_class: large
99
working_directory: ~/buie
@@ -111,6 +111,7 @@ jobs:
111111
steps:
112112
- checkout
113113
- setup-workspace
114+
- build-locales
114115
- run:
115116
name: Cypress run
116117
command: yarn --cwd /buie test:e2e

.flowconfig

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[ignore]
22
<PROJECT_ROOT>/scripts/
33
<PROJECT_ROOT>/es/
4-
<PROJECT_ROOT>/.*/dist/.*
54
<PROJECT_ROOT>/reports/
65
<PROJECT_ROOT>/node_modules/babel-plugin-flow-react-proptypes.*
76
<PROJECT_ROOT>/node_modules/conventional-changelog*
@@ -13,12 +12,13 @@
1312
<PROJECT_ROOT>/node_modules/draft-js*
1413
<PROJECT_ROOT>/node_modules/findup*
1514
<PROJECT_ROOT>/node_modules/config-chain*
16-
<PROJECT_ROOT>/node_modules/puppeteer*
17-
<PROJECT_ROOT>/node_modules/jest-puppeteer*
18-
<PROJECT_ROOT>/node_modules/start-server-and-test*
19-
<PROJECT_ROOT>/node_modules/jest-image-snapshot*
2015
<PROJECT_ROOT>/node_modules/react-styleguidist*
2116
<PROJECT_ROOT>/node_modules/immer*
17+
<PROJECT_ROOT>/node_modules/immutable*
18+
<PROJECT_ROOT>/node_modules/react-animate-height*
19+
<PROJECT_ROOT>/node_modules/react-beautiful-dnd*
20+
<PROJECT_ROOT>/node_modules/raf-sch*
21+
<PROJECT_ROOT>/node_modules/@box/react-virtualized*
2222
<PROJECT_ROOT>/.*/__tests__/.*
2323
<PROJECT_ROOT>/.*/*.stories.*
2424
# ignoring the flow check for this component specifically because it increased the scope too much when we are planning to switch to typescript anyways

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ npm-error.log
2020
reports
2121
scripts/rsync.json
2222
styleguide
23+
storybook
2324
test/screenshots
2425
test/videos
2526
test/dev.html

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
lts/hydrogen
1+
lts/iron

.storybook/gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/*
2+
!.gitignore
3+
!LICENSE
4+
!THIRD_PARTY_LICENSES
5+
!docs

.storybook/main.ts

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@ import path from 'path';
55

66
const language = process.env.LANGUAGE;
77

8+
const TranslationsPlugin = require('@box/frontend/webpack/TranslationsPlugin');
9+
const { translationDependencies } = require('../i18n.config');
10+
811
const config: {
912
stories: string[];
10-
addons: (string | { name: string; options: { sass: { implementation: any } } })[],
13+
addons: (string | { name: string; options: { sass: { implementation: any } } })[];
1114
framework: { name: string };
1215
staticDirs: string[];
1316
webpackFinal: (config: any) => Promise<any>;
14-
typescript: any
17+
typescript: any;
1518
} = {
1619
stories: ['../src/**/*.stories.@(js|jsx|ts|tsx)'],
1720

@@ -31,7 +34,7 @@ const config: {
3134
'@storybook/addon-docs',
3235
'@storybook/addon-webpack5-compiler-babel',
3336
'@chromatic-com/storybook',
34-
'storybook-react-intl'
37+
'storybook-react-intl',
3538
],
3639

3740
framework: {
@@ -55,11 +58,18 @@ const config: {
5558
'msw/native': path.resolve('node_modules/msw/lib/native/index.mjs'),
5659
};
5760

61+
config.plugins.push(
62+
new TranslationsPlugin({
63+
generateBundles: true,
64+
additionalMessageData: translationDependencies.map(pkg => `${pkg}/i18n/[language]`),
65+
}),
66+
);
67+
5868
return config;
5969
},
6070
typescript: {
61-
reactDocgen: 'react-docgen-typescript'
62-
}
71+
reactDocgen: 'react-docgen-typescript',
72+
},
6373
};
6474

6575
export default config;

.storybook/preview-body.html

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,7 @@
11
<style>
2-
#root {
3-
padding: 16px;
4-
}
5-
6-
.be.bce {
7-
height: 500px;
8-
}
9-
10-
.be.bcp {
11-
height: 500px;
12-
}
13-
14-
.be.bcu {
15-
height: 400px;
16-
}
17-
18-
.be.bcpr {
19-
height: 900px;
20-
}
21-
22-
.be.bcs {
23-
width: 1000px;
24-
height: 900px;
2+
html,
3+
body,
4+
#storybook-root {
5+
height: 100%;
256
}
267
</style>

.storybook/typings.d.ts

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// @ts-nocheck
33

44
declare const global: {
5-
FEATURES: Record<string, boolean>;
5+
FEATURE_FLAGS: Record<string, boolean>;
66
FILE_ID: string;
77
FOLDER_ID: string;
88
TOKEN: string;
@@ -12,27 +12,3 @@ declare module '*.md' {
1212
const content: string;
1313
export = content;
1414
}
15-
16-
namespace BoxVisualTestUtils {
17-
import { Page } from 'puppeteer';
18-
19-
async function gotoStory(id: string): Promise<Page>;
20-
21-
async function takeScreenshot(id: string): Promise<Buffer>;
22-
23-
async function takeScreenshotAfterInput(
24-
id: string,
25-
selector: string,
26-
action?: string,
27-
userInput?: string,
28-
afterInputSelector?: string,
29-
): Promise<Buffer>;
30-
31-
async function takeModalScreenshot(id: string, width?: number, height?: number): Promise<Buffer>;
32-
33-
async function blurInput(selector: string): Promise<void>;
34-
35-
async function clearInput(selector: string, page: Page): Promise<void>;
36-
37-
async function sleep(time?: number): Promise<void>;
38-
}

CODEOWNERS

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@
88

99
# Source
1010
/src/ @box/webapp
11-
/src/* @box/preview @box/ui-elements
12-
/src/api/ @box/preview @box/ui-elements
11+
/src/* @box/ui-elements
12+
/src/api/ @box/ui-elements
1313
/src/api/box-edit/ @box/partners
1414
/src/api/Feed.js @box/preview
1515
/src/api/uploads/ @box/create-communicate
16-
/src/elements/ @box/preview @box/ui-elements
16+
/src/components/ @box/ui-elements
17+
/src/elements/ @box/ui-elements
1718
/src/elements/content-explorer/ @box/ui-elements
1819
/src/elements/content-open-with/ @box/partners
1920
/src/elements/content-picker/ @box/ui-elements

cypress.config.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,7 @@ export default defineConfig({
1010
viewportHeight: 1260,
1111
viewportWidth: 1600,
1212
e2e: {
13-
// We've imported your old cypress plugins here.
14-
// You may want to clean this up later by importing these.
15-
setupNodeEvents(on, config) {
16-
// eslint-disable-next-line global-require,@typescript-eslint/no-var-requires
17-
return require('./test/plugins/index.js')(on, config);
18-
},
19-
baseUrl: 'http://localhost:6060/#',
13+
baseUrl: 'http://localhost:6061',
2014
specPattern: 'test/integration/**/*.cy.{js,jsx,ts,tsx}',
2115
supportFile: 'test/support/index.js',
2216
},

0 commit comments

Comments
 (0)