-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into revert-28965-scrollbar
- Loading branch information
Showing
42 changed files
with
333 additions
and
88 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-drawer-2717e06f-3daf-42cf-b77c-dcf03e0f40c9.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "prerelease", | ||
"comment": "refactor: organize code imports", | ||
"packageName": "@fluentui/react-drawer", | ||
"email": "marcosvmmoura@gmail.com", | ||
"dependentChangeType": "patch" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-drawer-d34a5b7e-7de6-4bcc-a0b1-095e88a476b2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "prerelease", | ||
"comment": "test: add e2e tests for base Drawer components", | ||
"packageName": "@fluentui/react-drawer", | ||
"email": "marcosvmmoura@gmail.com", | ||
"dependentChangeType": "patch" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-utilities-3d0f8452-1cf1-433e-9c40-cfdaae09343b.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "patch", | ||
"comment": "fix: `useOnScrollOutside` should invoke callback on dragging scrollbar", | ||
"packageName": "@fluentui/react-utilities", | ||
"email": "yuanboxue@microsoft.com", | ||
"dependentChangeType": "patch" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,13 @@ | ||
{ | ||
"extends": ["plugin:@fluentui/eslint-plugin/react"], | ||
"root": true | ||
"root": true, | ||
"overrides": [ | ||
{ | ||
"files": ["./src/e2e/*.tsx"], | ||
"rules": { | ||
"import/no-extraneous-dependencies": "off", | ||
"react/jsx-no-bind": "off" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
packages/react-components/react-drawer/src/components/Drawer/Drawer.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
packages/react-components/react-drawer/src/components/Drawer/Drawer.types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
packages/react-components/react-drawer/src/components/Drawer/useDrawerStyles.styles.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
packages/react-components/react-drawer/src/components/DrawerBody/renderDrawerBody.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/react-components/react-drawer/src/components/DrawerBody/useDrawerBody.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
...ges/react-components/react-drawer/src/components/DrawerBody/useDrawerBodyStyles.styles.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
packages/react-components/react-drawer/src/components/DrawerFooter/renderDrawerFooter.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/react-components/react-drawer/src/components/DrawerFooter/useDrawerFooter.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
...react-components/react-drawer/src/components/DrawerFooter/useDrawerFooterStyles.styles.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/react-components/react-drawer/src/components/DrawerHeader/renderDrawerHeader.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/react-components/react-drawer/src/components/DrawerHeader/useDrawerHeader.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
...react-components/react-drawer/src/components/DrawerHeader/useDrawerHeaderStyles.styles.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...nents/react-drawer/src/components/DrawerHeaderNavigation/renderDrawerHeaderNavigation.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...omponents/react-drawer/src/components/DrawerHeaderNavigation/useDrawerHeaderNavigation.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
...ct-drawer/src/components/DrawerHeaderNavigation/useDrawerHeaderNavigationStyles.styles.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...eact-components/react-drawer/src/components/DrawerHeaderTitle/renderDrawerHeaderTitle.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...es/react-components/react-drawer/src/components/DrawerHeaderTitle/useDrawerHeaderTitle.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...onents/react-drawer/src/components/DrawerHeaderTitle/useDrawerHeaderTitleStyles.styles.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
packages/react-components/react-drawer/src/components/DrawerInline/DrawerInline.cy.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import * as React from 'react'; | ||
import { mount } from '@cypress/react'; | ||
import { FluentProvider } from '@fluentui/react-provider'; | ||
import { webLightTheme } from '@fluentui/react-theme'; | ||
|
||
import { testDrawerBaseScenarios } from '../../e2e/DrawerShared'; | ||
import { DrawerInline } from './DrawerInline'; | ||
|
||
const mountFluent = (element: JSX.Element) => { | ||
mount(<FluentProvider theme={webLightTheme}>{element}</FluentProvider>); | ||
}; | ||
|
||
describe('DrawerInline', () => { | ||
testDrawerBaseScenarios(DrawerInline); | ||
|
||
describe('separator prop', () => { | ||
it('should not render any border when separator is false', () => { | ||
mountFluent(<DrawerInline id="drawer" position="start" open />); | ||
|
||
cy.get('#drawer').should('not.have.css', `border-right-width`, '1px'); | ||
cy.get('#drawer').should('not.have.css', `border-left-width`, '1px'); | ||
}); | ||
|
||
it('should render correct border when when position is `start`', () => { | ||
mountFluent(<DrawerInline id="drawer" position="start" separator open />); | ||
|
||
cy.get('#drawer').should('not.have.css', `border-left-width`, '1px'); | ||
cy.get('#drawer').should('have.css', `border-right-width`, '1px'); | ||
}); | ||
|
||
it('should render correct border when when position is `end`', () => { | ||
mountFluent(<DrawerInline id="drawer" position="end" separator open />); | ||
|
||
cy.get('#drawer').should('not.have.css', `border-right-width`, '1px'); | ||
cy.get('#drawer').should('have.css', `border-left-width`, '1px'); | ||
}); | ||
}); | ||
}); |
3 changes: 2 additions & 1 deletion
3
packages/react-components/react-drawer/src/components/DrawerInline/DrawerInline.types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/react-components/react-drawer/src/components/DrawerInline/renderDrawerInline.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/react-components/react-drawer/src/components/DrawerInline/useDrawerInline.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.