Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to Popper from Popover #1850

Merged
merged 33 commits into from
Jun 28, 2020
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
1c44706
Update deps
dmtrKovalenko Jun 2, 2020
db503b3
Migrate all pickers to popovers
dmtrKovalenko Jun 2, 2020
3823b70
Fix build errors
dmtrKovalenko Jun 2, 2020
4a26fdb
Merge branch 'next' into feature/migrate-to-Popper
dmtrKovalenko Jun 2, 2020
d2b093e
Update tests
dmtrKovalenko Jun 2, 2020
688f9c3
Remove component related tests
dmtrKovalenko Jun 2, 2020
53affe6
Remove duplicated useGlobalKeydown for tooltip popover hooks
dmtrKovalenko Jun 2, 2020
15e84bc
Fix eslint
dmtrKovalenko Jun 2, 2020
cdae3fa
Restore focus back to the last activeElement on close
dmtrKovalenko Jun 22, 2020
a06d371
Remove unused props
dmtrKovalenko Jun 22, 2020
8db37a4
Do not call `.focus()` while popper is not completely open
dmtrKovalenko Jun 24, 2020
c1efe75
Fix build issues and tests
dmtrKovalenko Jun 24, 2020
594dc0b
Merge branch next into feature/migrate-to-Popper
dmtrKovalenko Jun 24, 2020
7d5e2c0
Merge branch 'next' into feature/migrate-to-Popper
dmtrKovalenko Jun 24, 2020
f640f72
Add description comment for .skip test
dmtrKovalenko Jun 25, 2020
2ac55c8
Fix review points
dmtrKovalenko Jun 25, 2020
590b5d8
Fix PR review points
dmtrKovalenko Jun 25, 2020
7de39ba
Rename mui component name of PickerPopper
dmtrKovalenko Jun 25, 2020
3d06631
Merge conflicts
dmtrKovalenko Jun 25, 2020
ab4489d
Remove unused global
dmtrKovalenko Jun 25, 2020
99e8909
Back to MuiPickersPopper name
dmtrKovalenko Jun 25, 2020
85cfb5a
Use role to query date range picker fields
dmtrKovalenko Jun 25, 2020
5bd3419
Fix build errors
dmtrKovalenko Jun 25, 2020
4b7f988
Use popper onCreate callback to allow autofocus in calendar
dmtrKovalenko Jun 27, 2020
2336bdf
Update lib/src/_shared/PickerPopper.tsx
dmtrKovalenko Jun 27, 2020
a90e63e
Update lib/src/__tests__/DatePicker.test.tsx
dmtrKovalenko Jun 27, 2020
e5a3d90
Use inputRef as acnhorEl for Popper
dmtrKovalenko Jun 27, 2020
963b2d7
Refer PR review points
dmtrKovalenko Jun 27, 2020
0e0f2f4
Update lib/src/__tests__/DatePicker.test.tsx
dmtrKovalenko Jun 27, 2020
32c93e8
Skip keyboard test on CI
dmtrKovalenko Jun 27, 2020
5affb27
Fix import from '@mateiral-ui/core'
dmtrKovalenko Jun 27, 2020
d6917b6
Fix 'act' testing lib crashes
dmtrKovalenko Jun 27, 2020
72c0c89
Update e2e/component/KeyboardNavigation.spec.tsx
dmtrKovalenko Jun 28, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
- attach_workspace:
at: .
# --runInBand required to not get out of memory @see https://discuss.circleci.com/t/memory-problems-with-jest-and-workers/10297
- run: cd lib && yarn test:<<parameters.lib>> -- -- --runInBand
- run: cd lib && yarn test:<<parameters.lib>> --runInBand
- steps: << parameters.after-tests >>

cypress_tests:
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/demo/daterangepicker/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import * as CustomRangeInputs from './CustomRangeInputs.example';
> The date range picker will be made available in the coming months for production use as part of a paid extension to the community edition (MIT license) of Material-UI.
> This paid extension will include advanced components (rich data grid, date range picker, tree view drag & drop, etc.). Pricing for early access will start with an affordable plan.

The [date range pickers](https://material.io/components/pickers/) let users select a range of dates.
The [date range pickers](https://material.io/components/pickers/) let users select a range of dates.

<Ad />

Expand Down
176 changes: 62 additions & 114 deletions docs/prop-types.json

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

4 changes: 2 additions & 2 deletions e2e/component/KeyboardNavigation.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { DesktopDatePicker, MobileDatePicker, TimePicker } from '@material-ui/pi
describe('Keyboard navigation', () => {
context('DatePicker', () => {
function testCalendarKeyboardNavigation() {
console.log(document.activeElement);
dmtrKovalenko marked this conversation as resolved.
Show resolved Hide resolved
cy.get('body').type('{rightarrow}');
cy.findByLabelText('Oct 8, 2017').should('be.focused');

Expand Down Expand Up @@ -46,8 +47,6 @@ describe('Keyboard navigation', () => {
// @see https://github.com/cypress-io/cypress/issues/299
cy.findByLabelText('calendar view is open, switch to year view').click();

// cy.contains('button', '2017').should('be.focused');

cy.get('body').type('{downarrow}{leftarrow}{rightarrow}{rightarrow}');
cy.focused().type(' ');

Expand All @@ -74,6 +73,7 @@ describe('Keyboard navigation', () => {
});
});

// TODO fix on CI
context.skip('TimePicker', () => {
it('Allows keyboard control on hours view', () => {
mountPickerWithState(props => <TimePicker {...props} open />);
Expand Down
24 changes: 12 additions & 12 deletions lib/.size-snapshot.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{
"material-ui-pickers.esm.js": {
"bundled": 199554,
"minified": 106790,
"gzipped": 27475,
"bundled": 202219,
"minified": 107788,
"gzipped": 27928,
"treeshaked": {
"rollup": {
"code": 86534,
"import_statements": 2123
"code": 87268,
"import_statements": 2098
},
"webpack": {
"code": 96137
"code": 97011
}
}
},
"material-ui-pickers.umd.js": {
"bundled": 314914,
"minified": 121594,
"gzipped": 34397
"bundled": 317509,
"minified": 122269,
"gzipped": 34637
},
"material-ui-pickers.umd.min.js": {
"bundled": 269976,
"minified": 111766,
"gzipped": 31581
"bundled": 272605,
"minified": 112449,
"gzipped": 31811
}
}
2 changes: 1 addition & 1 deletion lib/src/CalendarSkeleton.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import clsx from 'clsx';
import Skeleton from '@material-ui/lab/Skeleton';
import { makeStyles } from '@material-ui/core';
import { makeStyles } from '@material-ui/core/styles';
import { DAY_SIZE, DAY_MARGIN } from './constants/dimensions';
import { withDefaultProps } from './_shared/withDefaultProps';
import { useStyles as useCalendarStyles } from './views/Calendar/Calendar';
Expand Down
Loading