diff --git a/app.js b/app.js index fcb251a69..64cc7aa25 100644 --- a/app.js +++ b/app.js @@ -1,11 +1,5 @@ /* application specific logic */ -// FIXME: remove once atlaskit work with React 16 -// It seems that @atlaskit/icon is importing PropTypes from React, but it -// happens through some glyph coffee script template. It could be that more -// things are broken there (not only the icon). -import './react/features/base/react/prop-types-polyfill.js'; - import 'jquery'; import 'jquery-contextmenu'; import 'jQuery-Impromptu'; diff --git a/flow-typed/npm/prop-types_v15.x.x.js b/flow-typed/npm/prop-types_v15.x.x.js deleted file mode 100644 index ba9478bfe..000000000 --- a/flow-typed/npm/prop-types_v15.x.x.js +++ /dev/null @@ -1,35 +0,0 @@ -// flow-typed signature: d9a983bb1ac458a256c31c139047bdbb -// flow-typed version: 927687984d/prop-types_v15.x.x/flow_>=v0.41.x - -type $npm$propTypes$ReactPropsCheckType = ( - props: any, - propName: string, - componentName: string, - href?: string) => ?Error; - -declare module 'prop-types' { - declare var array: React$PropType$Primitive>; - declare var bool: React$PropType$Primitive; - declare var func: React$PropType$Primitive; - declare var number: React$PropType$Primitive; - declare var object: React$PropType$Primitive; - declare var string: React$PropType$Primitive; - declare var symbol: React$PropType$Primitive; - declare var any: React$PropType$Primitive; - declare var arrayOf: React$PropType$ArrayOf; - declare var element: React$PropType$Primitive; /* TODO */ - declare var instanceOf: React$PropType$InstanceOf; - declare var node: React$PropType$Primitive; /* TODO */ - declare var objectOf: React$PropType$ObjectOf; - declare var oneOf: React$PropType$OneOf; - declare var oneOfType: React$PropType$OneOfType; - declare var shape: React$PropType$Shape; - - declare function checkPropTypes( - propTypes: $Subtype<{[_: $Keys]: $npm$propTypes$ReactPropsCheckType}>, - values: V, - location: string, - componentName: string, - getStack: ?(() => ?string) - ) : void; -} diff --git a/package-lock.json b/package-lock.json index 944437540..9bccdec9c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -691,18 +691,6 @@ "react-scrolllock": "^3.0.2" } }, - "@atlaskit/layer-manager": { - "version": "5.0.19", - "resolved": "https://registry.npmjs.org/@atlaskit/layer-manager/-/layer-manager-5.0.19.tgz", - "integrity": "sha512-2NvSNEERS9uW/oExF7ltj/h8akJvJRJnhEleKGx1JXqnbCUwQHtGkiP+06cX9JriGnhPEySt26dfQS5dAA0sKg==", - "requires": { - "@babel/runtime": "^7.0.0", - "prop-types": "^15.5.10", - "react-focus-lock": "^1.11.3", - "react-scrolllock": "^3.0.2", - "react-transition-group": "^2.2.1" - } - }, "@atlaskit/lozenge": { "version": "6.2.4", "resolved": "https://registry.npmjs.org/@atlaskit/lozenge/-/lozenge-6.2.4.tgz", diff --git a/package.json b/package.json index 158791819..9b512f4ce 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,6 @@ "@atlaskit/icon": "15.0.3", "@atlaskit/inline-dialog": "5.3.0", "@atlaskit/inline-message": "7.0.10", - "@atlaskit/layer-manager": "5.0.19", "@atlaskit/lozenge": "6.2.4", "@atlaskit/modal-dialog": "7.1.2", "@atlaskit/multi-select": "11.0.13", @@ -56,7 +55,6 @@ "moment": "2.19.4", "moment-duration-format": "2.2.2", "postis": "2.2.0", - "prop-types": "15.6.0", "react": "16.6.3", "react-dom": "16.6.3", "react-emoji-render": "0.4.6", diff --git a/react/features/base/dialog/components/web/StatelessDialog.js b/react/features/base/dialog/components/web/StatelessDialog.js index 42d52f0ba..0d49d2673 100644 --- a/react/features/base/dialog/components/web/StatelessDialog.js +++ b/react/features/base/dialog/components/web/StatelessDialog.js @@ -1,10 +1,8 @@ // @flow import Button, { ButtonGroup } from '@atlaskit/button'; -import { withContextFromProps } from '@atlaskit/layer-manager'; import Modal, { ModalFooter } from '@atlaskit/modal-dialog'; import _ from 'lodash'; -import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { translate } from '../../../i18n'; @@ -71,17 +69,6 @@ type Props = { width: string }; -/** - * ContexTypes is used as a workaround for Atlaskit's modal being displayed - * outside of the normal App hierarchy, thereby losing context. ContextType - * is responsible for taking its props and passing them into children. - * - * @type {ReactElement} - */ -const ContextProvider = withContextFromProps({ - i18n: PropTypes.object -}); - /** * Web dialog that uses atlaskit modal-dialog to display dialogs. */ @@ -136,27 +123,16 @@ class StatelessDialog extends Component { onDialogDismissed = { this._onDialogDismissed } shouldCloseOnEscapePress = { true } width = { width || 'medium' }> - { - - /** - * Wrapping the contents of {@link Modal} with - * {@link ContextProvider} is a workaround for the - * i18n context becoming undefined as modal gets rendered - * outside of the normal react app context. - */ - } - -
- -
-
+
+ +
); } diff --git a/react/features/base/react/prop-types-polyfill.js b/react/features/base/react/prop-types-polyfill.js deleted file mode 100644 index 24424cf50..000000000 --- a/react/features/base/react/prop-types-polyfill.js +++ /dev/null @@ -1,10 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; - -/* eslint-disable react/no-deprecated */ - -if (typeof React.PropTypes === 'undefined') { - React.PropTypes = PropTypes; -} - -/* eslint-enable react/no-deprecated */ diff --git a/react/features/settings/popup.js b/react/features/settings/popup.js index 19b365e88..f0eaf90ac 100644 --- a/react/features/settings/popup.js +++ b/react/features/settings/popup.js @@ -1,8 +1,5 @@ /* global JitsiMeetJS */ -// FIXME: remove once atlaskit work with React 16. -import '../base/react/prop-types-polyfill.js'; - import DeviceSelectionPopup from './DeviceSelectionPopup'; let deviceSelectionPopup; diff --git a/webpack.config.js b/webpack.config.js index 5e1027985..474e25165 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -125,10 +125,6 @@ module.exports = [ './react/features/always-on-top/index.js', 'dial_in_info_bundle': [ - - // atlaskit does not support React 16 prop-types - './react/features/base/react/prop-types-polyfill.js', - './react/features/invite/components/dial-in-info-page' ],