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

Support auto detection of orientation change for safari #1207

Merged
merged 1 commit into from Jul 27, 2019

Conversation

dmtrKovalenko
Copy link
Member

This PR closes #1195

Description

Use deprecated window.orientation to support ios devices :)

@codecov
Copy link

codecov bot commented Jul 27, 2019

Codecov Report

Merging #1207 into next will decrease coverage by 0.05%.
The diff coverage is 62.5%.

Impacted file tree graph

@@            Coverage Diff             @@
##             next    #1207      +/-   ##
==========================================
- Coverage   94.38%   94.33%   -0.06%     
==========================================
  Files          56       56              
  Lines        1406     1411       +5     
  Branches      195      208      +13     
==========================================
+ Hits         1327     1331       +4     
- Misses         60       62       +2     
+ Partials       19       18       -1
Impacted Files Coverage Δ
lib/src/_shared/hooks/useIsLandscape.tsx 83.33% <62.5%> (-8.98%) ⬇️
lib/src/views/Clock/ClockPointer.tsx 96% <0%> (+4%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3d2e990...6001b29. Read the comment docs.

@dmtrKovalenko dmtrKovalenko merged commit 661544f into next Jul 27, 2019
@dmtrKovalenko dmtrKovalenko deleted the bugfix/auto-orientation-ios branch July 27, 2019 18:06
dmtrKovalenko added a commit that referenced this pull request Jul 31, 2019
* Fix not working logo

* Mention required material-ui v4 in README.md

* 📝 improve grammar in docs (#1073)

* 📝 improve grammar in docs

First of all, amazing project! 🎉 I took the liberty, and read through the docs, and on my way, I corrected some of the English grammar, I hope you don't mind! Keep up the great work! 👨‍🏭

* 📝 more grammar improvements

* Fix time order in RTL DateTimePicker (mui-org#1071) (#1072)

* Consume fade correctly (#1077)

* Remove react-event-listener (#1075)

* Remove react-event-listener

* Fix lint

* Make reusable useKeyDown

* Update packages | 02 06 2018 (#1079)

* Update packages

* Shut up now bot

* Fix now.json silent location

* Fix ts error for navigator.permissions

* Disable ToolbarButtonOverride, closes #1076 (#1080)

* Fix inputRef collision, closes #1069 (#1081)

* [DatePicker] add strictCompareDates prop (#1067)

* DatePicker: add validateStrict props

Add strict camparison for minDate, maxDate, disablePast, disableFuture

* Min/Max date validation

rename props validateStrict to strictCompareDates

* DateValidation: strictCompareDates reduce conditions

* Async month changed callbacks (#1052)

* Added async handling of onMonthChange with loading indicator

* Only show loading indicator if onMonthChange returns a Promise

* Added test cases

* Added some more test cases. Testing push and pop functionality of loading queue

* Removed unused import

* Updated docs and changed callback type in MonthSelection

* Replaced 'async/await' with 'then' to reduce bundle size

* Importing CircularProgress by path instead

* Added support for optional loading indicator as a property

* Moved tests to e2e

* Removed unused import

* Fixed Prettier violation

* [typescript] Fix incorrectly inferred type for keyboard onChange (#1083)

* Support keyboardIcon for v3, closes #1084 (#1085)

* Support keyboardIcon for v3. closes #1084

* Add new prop to the docs

* Support TextFieldComponent prop (#1087)

* v3.1.0

* Change release script

* Change bundlephobia badge link

* Compare date strict tests (#1089)

* WrappedKeyboardPicker: send strictCompareDates prop

* compareDateStrict: add tests

* Fix "todayLabel" prop type description. (#1091)

* Fix "todayLabel" prop type description.

* Update lib/src/wrappers/ModalWrapper.tsx

Co-Authored-By: Dmitriy Kovalenko <dmtr.kovalenko@outlook.com>

* Fix typescript material-ui overrides example (#1092)

* Spread emptyLabel from passing to textField, closes #1093

* Fix incorrect DateTimePicker year button alignment on wide devices

* Inner state for picker modal (#1095)

* Use inner state for displayed date in calendar

* Make inline pickers controlled by default

* Fix tests

* Fix deadlock on rendering with usePickerState

* Fix crashing on utils change

* Fix not applying keydown listener, closes #1090

* Update packages 08.06.2019 (#1096)

* Update packages 08.06.2019

* Fix prettier

* [docs] Add fetching data example (#1097)

* Use inner state for displayed date in calendar

* Make inline pickers controlled by default

* Fix tests

* Fix deadlock on rendering with usePickerState

* Fix crashing on utils change

* [docs] Add fetching data example

* Change text and remove unnecessary details from example

* Adjust some props description

* [Refactoring] Reorganize folder structure (#1098)

* Regorganize folder structure

* Create new views folder with all components

* Remove unnecessary theme type annotations

* Restore lost in merge changes

* Fix imports in tests

* [Refactoring] Refactor Calendar.tsx

* [Refactoring] Better hook memoization (#1101)

* [Refactoring] Refactor useOpenState implementation

Eliminate code duplication between the controlled and the uncontrolled implementation.
Albeit short today, the code that calls the onOpen/onClose callbacks was duplicated.
The controlled variant did not memoize with useCallbacks().

Fix memoization by not depending on `props` as a whole.

* [Refactoring] Better hook memoization in usePickerState/useKeyboardPickerState

Avoid passing the entire `props` object into the hooks' `deps', as it will usually be a fresh object, which prevents memoization.

* Make "Today" button to set inner state, instead of onChange

* Fix prettier in-merge error

* [#1111] Properly rely on views order when switching views (#1116)

* Polyfill array includes manually for IE11 (#1117)

* Polyfill array includes manually for IE11

* Make proper implementation of arrayIncludes 🙆‍♂️

* Update release script

* v3.1.1

* Add visual regression tests (#1121)

* Add visual regression tests

* Make docs run in backgorund on ci for tests

* Fix percy command not found error

* Add cypress verify on install

* Restory cypress binary cache before running

* Add additional yarn install

* Change order of builds

* Fix tsconfig.json error

* Add more visual regression scenarios

* Update config.yml

* Disable random icons in percy

* Make year to be 2019 in tests

* Add more scenarios

* Completely hide Ads in percy

* [docs] Fix crashing on changing utils (#1123)

* [docs] Fix crashing on changing utils

* Rewrite MuiPickersUtilsProvider on hooks

* Fix moment localization example

* Update SecondsTimePicker.example.jsx (#1125)

* Add Percy badge (#1129)

* [docs] Fix views type labels for DatePicker API (#1138)

* [#1126] Fix rerendering loop

* Fix invalidLabel prop-type warning

* [#1126] Fix rerendering loop (#1139)

* Custom spacing support (#1141)

* Add custom theme spacing example

* Fix issues with theme spacing

* Allow to pass custom rifm formatter (#1142)

* v3.1.2

* 3.1.2

* [Calendar] Remove arrows white background on sliding from disabled state (#1152)

* Add Hijri calendar example (#1153)

* Add Hijri calendar example

* Combine jalaali and hijri in single page

* Address PR feedback

* Fix headers size

* Do not throw error if input value was cleared symbol by symbol (#1160)

* [TimePicker] Properly hide separator if views not included (#1161)

* [InlineVariant] Do not update value on backdrop click (#1162)

* [docs] Fix variant prop type displaying, highlight code in 'type' column (#1163)

* Fix variant prop displaying, highlight type code

* Remove additional space after each prop

* Add variant="static" (#1164)

* Add variant="static"

* More variant="static" examples

* Landscape orientation support  (#1177)

* Fix persian examples

* Remove injected css after front-end mount

* Determine and apply styles for current orientation

* Add tests

* Support landscape for TimePicker

* Use isomorphic effect for event handler

* Fix lint errors

* Add new props to the documentation

* Fix displaying short weekdays in datepicker toolbar

* Custom toolbar component (#1182)

* Add new ToolbarComponent prop for custom toolbars

* Update props docs

* Run docgen on precommit hook

* Run docgen on precommit hook

* Run git add after precommit command

* Automatically format json before prettier

* Do not accept a and p sympbols in not am/pm mode (#1183)

* Fix keyboard popover position (#1184)

* Correct position of inline wrapper popover

* Adjust variant prop description

* Adjust props description

* Uncomment example

* Add prop-types.json to prettier-ignore

* Properly freeze clock for percy

* Use yarn to publish

* v3.2.0

* Update publish command

* Use KeyboardDatePicker for formik integration example

* [docs] Add redux form integration example (#1189)

* install redux and redux-form

* configure redux-form

* wrap App with redux provider

* create redux form example

* add react-redux types to dev dependencies

* Update docs/pages/guides/form-integration.mdx

Co-Authored-By: Dmitriy Kovalenko <dmtr.kovalenko@outlook.com>

* move redux to example folder

* Wrap example with redux

* remove redux-thunk

* modify onChange to allow empty field

in the other way, the field always gotten the last valid value, even when explicit deleted.
This way, the user can clear the field!

* move store to inside Form example

* Update useIsLandscape.tsx (#1199)

Fix crashing on changing orientation for some devices

* Update CSS overrides example (#1201)

isSelected is no longer a valid theme entry for MUI Pickers, so update
the docs to reflect this change. Also extends the example for
dayDisabled override.

* Support auto detection of orientation change for safari (#1207)

* Add inputProps to the outputted typescript definitions (#1208)

* Fix dispatching 2 onChange events with variant="inline" (#1209)

* Fix dispatching 2 onChange events with variant="inline"

* Update lib/src/_shared/hooks/usePickerState.ts

* Make autoOk property to have bigger prioritiy

* Add releases page (#1210)

* Add releases page

It lists available documentation websites for v3+ versions

* Use constant for the latest url link

* Make releases table horisontally scrollable on mobile

* Fix grammar

* Add shorthand for static state managment (#1212)

* [KeyboardDateInput] Fix not updating formatter when new mask passed (#1213)

* fix when both clear button & showToday button (#1211)

* Add babel transpilation to esm (#1206)

* Add babel transpilation to esm

* Use babel for rollup as well

* Fix missing * in jsdoc comment for ToolbarComponent

* Update packages (#1217)

* Update packages

* Fix overrides typing

* Add { force: true } for readonly inputs

* Add one more { force: true }

* v3.2.1

* Remove old versions from readme

* More clearly highlight requiring version of date-fns
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automatic update of display orientation does not work properly when turning devices
1 participant