diff --git a/change/@fluentui-react-overflow-53f7bd6a-ea74-4a2b-a370-95aa5ec4a3b0.json b/change/@fluentui-react-overflow-53f7bd6a-ea74-4a2b-a370-95aa5ec4a3b0.json new file mode 100644 index 00000000000000..95a3c161447c89 --- /dev/null +++ b/change/@fluentui-react-overflow-53f7bd6a-ea74-4a2b-a370-95aa5ec4a3b0.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: Migrate to new package structure.", + "packageName": "@fluentui/react-overflow", + "email": "tristan.watanabe@gmail.com", + "dependentChangeType": "none" +} diff --git a/packages/react-components/react-overflow/.npmignore b/packages/react-components/react-overflow/.npmignore index 52d2a7273a151d..f7ce568a6dbf7c 100644 --- a/packages/react-components/react-overflow/.npmignore +++ b/packages/react-components/react-overflow/.npmignore @@ -3,10 +3,11 @@ bundle-size/ config/ coverage/ -e2e/ +docs/ etc/ node_modules/ src/ +stories/ dist/types/ temp/ __fixtures__ @@ -16,7 +17,7 @@ __tests__ *.api.json *.log *.spec.* -*.stories.* +*.cy.* *.test.* *.yml diff --git a/packages/react-components/react-overflow/.storybook/main.js b/packages/react-components/react-overflow/.storybook/main.js index f57cfd09509e78..26536b61b387f6 100644 --- a/packages/react-components/react-overflow/.storybook/main.js +++ b/packages/react-components/react-overflow/.storybook/main.js @@ -2,7 +2,7 @@ const rootMain = require('../../../../.storybook/main'); module.exports = /** @type {Omit} */ ({ ...rootMain, - stories: [...rootMain.stories, '../src/**/*.stories.mdx', '../src/**/index.stories.@(ts|tsx)'], + stories: [...rootMain.stories, '../stories/**/*.stories.mdx', '../stories/**/index.stories.@(ts|tsx)'], addons: [...rootMain.addons], webpackFinal: (config, options) => { const localConfig = { ...rootMain.webpackFinal(config, options) }; diff --git a/packages/react-components/react-overflow/.storybook/tsconfig.json b/packages/react-components/react-overflow/.storybook/tsconfig.json index f9f60e1234ed49..ea89218a3d916f 100644 --- a/packages/react-components/react-overflow/.storybook/tsconfig.json +++ b/packages/react-components/react-overflow/.storybook/tsconfig.json @@ -6,5 +6,5 @@ "checkJs": true, "types": ["static-assets", "environment", "storybook__addons"] }, - "include": ["../src/**/*.stories.ts", "../src/**/*.stories.tsx", "*.js"] + "include": ["../stories/**/*.stories.ts", "../stories/**/*.stories.tsx", "*.js"] } diff --git a/packages/react-components/react-overflow/e2e/Overflow.e2e.tsx b/packages/react-components/react-overflow/src/Overflow.cy.tsx similarity index 99% rename from packages/react-components/react-overflow/e2e/Overflow.e2e.tsx rename to packages/react-components/react-overflow/src/Overflow.cy.tsx index 3b085a511be69f..8c4da8c87b34af 100644 --- a/packages/react-components/react-overflow/e2e/Overflow.e2e.tsx +++ b/packages/react-components/react-overflow/src/Overflow.cy.tsx @@ -416,7 +416,7 @@ describe('Overflow', () => { cy.get(`[${selectors.divider}]`).should('have.length', 1); }); - it.only('should remove overflow menu if the last overflowed item can take its place', () => { + it('should remove overflow menu if the last overflowed item can take its place', () => { const mapHelper = new Array(10).fill(0).map((_, i) => i); mount( diff --git a/packages/react-components/react-overflow/src/stories/Overflow/CustomPriorities.stories.tsx b/packages/react-components/react-overflow/stories/Overflow/CustomPriorities.stories.tsx similarity index 100% rename from packages/react-components/react-overflow/src/stories/Overflow/CustomPriorities.stories.tsx rename to packages/react-components/react-overflow/stories/Overflow/CustomPriorities.stories.tsx diff --git a/packages/react-components/react-overflow/src/stories/Overflow/Dividers.stories.tsx b/packages/react-components/react-overflow/stories/Overflow/Dividers.stories.tsx similarity index 100% rename from packages/react-components/react-overflow/src/stories/Overflow/Dividers.stories.tsx rename to packages/react-components/react-overflow/stories/Overflow/Dividers.stories.tsx diff --git a/packages/react-components/react-overflow/src/stories/Overflow/DomOrder.stories.tsx b/packages/react-components/react-overflow/stories/Overflow/DomOrder.stories.tsx similarity index 100% rename from packages/react-components/react-overflow/src/stories/Overflow/DomOrder.stories.tsx rename to packages/react-components/react-overflow/stories/Overflow/DomOrder.stories.tsx diff --git a/packages/react-components/react-overflow/src/stories/Overflow/MinimumVisible.stories.tsx b/packages/react-components/react-overflow/stories/Overflow/MinimumVisible.stories.tsx similarity index 100% rename from packages/react-components/react-overflow/src/stories/Overflow/MinimumVisible.stories.tsx rename to packages/react-components/react-overflow/stories/Overflow/MinimumVisible.stories.tsx diff --git a/packages/react-components/react-overflow/src/stories/Overflow/Pinned.stories.tsx b/packages/react-components/react-overflow/stories/Overflow/Pinned.stories.tsx similarity index 100% rename from packages/react-components/react-overflow/src/stories/Overflow/Pinned.stories.tsx rename to packages/react-components/react-overflow/stories/Overflow/Pinned.stories.tsx diff --git a/packages/react-components/react-overflow/src/stories/Overflow/PriorityWithDividers.stories.tsx b/packages/react-components/react-overflow/stories/Overflow/PriorityWithDividers.stories.tsx similarity index 100% rename from packages/react-components/react-overflow/src/stories/Overflow/PriorityWithDividers.stories.tsx rename to packages/react-components/react-overflow/stories/Overflow/PriorityWithDividers.stories.tsx diff --git a/packages/react-components/react-overflow/src/stories/Overflow/ReverseDomOrder.stories.tsx b/packages/react-components/react-overflow/stories/Overflow/ReverseDomOrder.stories.tsx similarity index 100% rename from packages/react-components/react-overflow/src/stories/Overflow/ReverseDomOrder.stories.tsx rename to packages/react-components/react-overflow/stories/Overflow/ReverseDomOrder.stories.tsx diff --git a/packages/react-components/react-overflow/src/stories/Overflow/Selection.stories.tsx b/packages/react-components/react-overflow/stories/Overflow/Selection.stories.tsx similarity index 100% rename from packages/react-components/react-overflow/src/stories/Overflow/Selection.stories.tsx rename to packages/react-components/react-overflow/stories/Overflow/Selection.stories.tsx diff --git a/packages/react-components/react-overflow/src/stories/Overflow/index.stories.tsx b/packages/react-components/react-overflow/stories/Overflow/index.stories.tsx similarity index 100% rename from packages/react-components/react-overflow/src/stories/Overflow/index.stories.tsx rename to packages/react-components/react-overflow/stories/Overflow/index.stories.tsx diff --git a/packages/react-components/react-overflow/src/stories/Overflow/utils.stories.tsx b/packages/react-components/react-overflow/stories/Overflow/utils.stories.tsx similarity index 100% rename from packages/react-components/react-overflow/src/stories/Overflow/utils.stories.tsx rename to packages/react-components/react-overflow/stories/Overflow/utils.stories.tsx diff --git a/packages/react-components/react-overflow/e2e/tsconfig.json b/packages/react-components/react-overflow/tsconfig.cy.json similarity index 70% rename from packages/react-components/react-overflow/e2e/tsconfig.json rename to packages/react-components/react-overflow/tsconfig.cy.json index f6b23b30d510ba..93a140885851da 100644 --- a/packages/react-components/react-overflow/e2e/tsconfig.json +++ b/packages/react-components/react-overflow/tsconfig.cy.json @@ -1,9 +1,9 @@ { - "extends": "../tsconfig.json", + "extends": "./tsconfig.json", "compilerOptions": { "isolatedModules": false, "types": ["node", "cypress", "cypress-storybook/cypress", "cypress-real-events"], "lib": ["ES2019", "dom"] }, - "include": ["**/*.ts", "**/*.tsx"] + "include": ["**/*.cy.ts", "**/*.cy.tsx"] } diff --git a/packages/react-components/react-overflow/tsconfig.json b/packages/react-components/react-overflow/tsconfig.json index 1941a041d46c19..1317f81620ca5e 100644 --- a/packages/react-components/react-overflow/tsconfig.json +++ b/packages/react-components/react-overflow/tsconfig.json @@ -20,6 +20,9 @@ }, { "path": "./.storybook/tsconfig.json" + }, + { + "path": "./tsconfig.cy.json" } ] } diff --git a/packages/react-components/react-overflow/tsconfig.lib.json b/packages/react-components/react-overflow/tsconfig.lib.json index 008c602dc19d24..4362ef2eb7d573 100644 --- a/packages/react-components/react-overflow/tsconfig.lib.json +++ b/packages/react-components/react-overflow/tsconfig.lib.json @@ -9,6 +9,15 @@ "inlineSources": true, "types": ["static-assets", "environment"] }, - "exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.test.ts", "**/*.test.tsx", "**/*.stories.ts", "**/*.stories.tsx"], + "exclude": [ + "**/*.spec.ts", + "**/*.spec.tsx", + "**/*.test.ts", + "**/*.test.tsx", + "**/*.stories.ts", + "**/*.stories.tsx", + "**/*.cy.ts", + "**/*.cy.tsx" + ], "include": ["./src/**/*.ts", "./src/**/*.tsx"] }