Skip to content

Commit

Permalink
[Menu] Add a new warning (mui#7962)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari authored Aug 30, 2017
1 parent 1a9b612 commit 552e101
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 35 deletions.
2 changes: 1 addition & 1 deletion docs/src/pages/demos/cards/cards.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Here's an example of a media control card.

## Complex Interaction

On desktop, card content can expand and scroll internally.
On desktop, card content can expand.

{{demo='pages/demos/cards/RecipeReviewCard.js'}}

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"jss-preset-default": "^3.0.0",
"keycode": "^2.1.9",
"lodash": "^4.17.4",
"next": "^3.0.3",
"next": "^3.2.0",
"prop-types": "^15.5.10",
"react-event-listener": "^0.5.0",
"react-jss": "^7.1.0",
Expand Down Expand Up @@ -134,7 +134,7 @@
"gm": "^1.23.0",
"jsdom": "11.1.0",
"json-loader": "^0.5.7",
"karma": "^1.7.0",
"karma": "^1.7.1",
"karma-browserstack-launcher": "^1.3.0",
"karma-mocha": "^1.3.0",
"karma-mocha-reporter": "^2.2.4",
Expand All @@ -146,7 +146,7 @@
"nprogress": "^0.2.0",
"nyc": "^11.0.3",
"phantomjs-prebuilt": "^2.1.15",
"prettier": "^1.6.0",
"prettier": "^1.6.1",
"prismjs": "^1.6.0",
"random-words": "0.0.1",
"raw-loader": "^0.5.1",
Expand All @@ -156,7 +156,7 @@
"react-docgen": "^3.0.0-beta6",
"react-dom": "latest",
"react-redux": "^5.0.6",
"react-swipeable-views": "^0.12.7",
"react-swipeable-views": "^0.12.8",
"react-test-renderer": "^15.6.1",
"recast": "^0.12.6",
"recursive-readdir-sync": "^1.0.6",
Expand Down
10 changes: 10 additions & 0 deletions src/Popover/Popover.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import React from 'react';
import type { Node } from 'react';
import ReactDOM from 'react-dom';
import classNames from 'classnames';
import warning from 'warning';
import contains from 'dom-helpers/query/contains';
import debounce from 'lodash/debounce';
import EventListener from 'react-event-listener';
Expand Down Expand Up @@ -323,6 +324,15 @@ class Popover extends React.Component<AllProps, void> {
contentAnchorOffset =
contentAnchorEl.offsetTop + contentAnchorEl.clientHeight / 2 - scrollTop || 0;
}

// != the default value
warning(
this.props.anchorOrigin.vertical === 'top',
[
'Material-UI: You can change the `anchorOrigin.vertical` value when also ',
'providing the `getContentAnchorOffset` property. Pick one.',
].join(),
);
}

return contentAnchorOffset;
Expand Down
61 changes: 31 additions & 30 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3822,7 +3822,7 @@ hoist-non-react-statics@^1.0.0, hoist-non-react-statics@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-1.2.0.tgz#aa448cf0986d55cc40773b17174b7dd066cb7cfb"

hoist-non-react-statics@^2.2.1:
hoist-non-react-statics@^2.2.1, hoist-non-react-statics@^2.2.2:
version "2.3.0"
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.3.0.tgz#ede16318c2ff1f9fe3a025396ba06fd4c44608bb"

Expand Down Expand Up @@ -4599,9 +4599,9 @@ karma-webpack@^2.0.4:
source-map "^0.1.41"
webpack-dev-middleware "^1.0.11"

karma@^1.7.0:
version "1.7.0"
resolved "https://registry.yarnpkg.com/karma/-/karma-1.7.0.tgz#6f7a1a406446fa2e187ec95398698f4cee476269"
karma@^1.7.1:
version "1.7.1"
resolved "https://registry.yarnpkg.com/karma/-/karma-1.7.1.tgz#85cc08e9e0a22d7ce9cca37c4a1be824f6a2b1ae"
dependencies:
bluebird "^3.3.0"
body-parser "^1.16.1"
Expand Down Expand Up @@ -5263,9 +5263,9 @@ netrc@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/netrc/-/netrc-0.1.4.tgz#6be94fcaca8d77ade0a9670dc460914c94472444"

next@^3.0.3:
version "3.0.6"
resolved "https://registry.yarnpkg.com/next/-/next-3.0.6.tgz#14d9330b1f4eab60fdb84523034a3016f16fe414"
next@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/next/-/next-3.2.0.tgz#86026844c65f4fa71c0430a99627e0a71ccd2982"
dependencies:
ansi-html "0.0.7"
babel-core "6.25.0"
Expand All @@ -5292,6 +5292,7 @@ next@^3.0.3:
friendly-errors-webpack-plugin "1.5.0"
glob "7.1.1"
glob-promise "3.1.0"
hoist-non-react-statics "^2.2.2"
htmlescape "1.1.1"
http-status "1.0.1"
json-loader "0.5.4"
Expand All @@ -5309,7 +5310,7 @@ next@^3.0.3:
recursive-copy "^2.0.6"
send "^0.15.3"
source-map-support "0.4.15"
strip-ansi "4.0.0"
strip-ansi "3.0.1"
styled-jsx "^1.0.8"
touch "3.1.0"
unfetch "3.0.0"
Expand Down Expand Up @@ -6186,9 +6187,9 @@ preserve@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"

prettier@^1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.6.0.tgz#23e9c68251f440feb847f558821bead21765919a"
prettier@^1.6.1:
version "1.6.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.6.1.tgz#850f411a3116226193e32ea5acfc21c0f9a76d7d"

prismjs@^1.6.0:
version "1.6.0"
Expand Down Expand Up @@ -6506,33 +6507,33 @@ react-scrollbar-size@^2.0.0:
prop-types "^15.5.10"
react-event-listener "^0.4.5"

react-swipeable-views-core@^0.12.5:
version "0.12.5"
resolved "https://registry.yarnpkg.com/react-swipeable-views-core/-/react-swipeable-views-core-0.12.5.tgz#7113f3a5c84f85042447a7c49e3f2a206eab7931"
react-swipeable-views-core@^0.12.8:
version "0.12.8"
resolved "https://registry.yarnpkg.com/react-swipeable-views-core/-/react-swipeable-views-core-0.12.8.tgz#99460621e5a6da07fb482a25b151905ae7a797a9"
dependencies:
babel-runtime "^6.23.0"
warning "^3.0.0"

react-swipeable-views-utils@^0.12.7:
version "0.12.7"
resolved "https://registry.yarnpkg.com/react-swipeable-views-utils/-/react-swipeable-views-utils-0.12.7.tgz#648b7abea405975763f3792020b2419a3950f50b"
react-swipeable-views-utils@^0.12.8:
version "0.12.8"
resolved "https://registry.yarnpkg.com/react-swipeable-views-utils/-/react-swipeable-views-utils-0.12.8.tgz#9483fc7dd370032f2f93ac44f2a2913d7c52aa41"
dependencies:
babel-runtime "^6.23.0"
fbjs "^0.8.4"
keycode "^2.1.7"
prop-types "^15.5.4"
react-event-listener "^0.5.0"
react-swipeable-views-core "^0.12.5"
react-swipeable-views-core "^0.12.8"

react-swipeable-views@^0.12.7:
version "0.12.7"
resolved "https://registry.yarnpkg.com/react-swipeable-views/-/react-swipeable-views-0.12.7.tgz#6df53868d7ed92874e138753b8d988a448103863"
react-swipeable-views@^0.12.8:
version "0.12.8"
resolved "https://registry.yarnpkg.com/react-swipeable-views/-/react-swipeable-views-0.12.8.tgz#8541daab5881067e58281d1e6ff13815ae94ebf5"
dependencies:
babel-runtime "^6.23.0"
dom-helpers "^3.2.1"
prop-types "^15.5.4"
react-swipeable-views-core "^0.12.5"
react-swipeable-views-utils "^0.12.7"
react-swipeable-views-core "^0.12.8"
react-swipeable-views-utils "^0.12.8"
warning "^3.0.0"

react-test-renderer@^15.6.1:
Expand Down Expand Up @@ -7371,18 +7372,18 @@ stringstream@~0.0.4:
version "0.0.5"
resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878"

[email protected], strip-ansi@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f"
dependencies:
ansi-regex "^3.0.0"

strip-ansi@^3.0.0, strip-ansi@^3.0.1:
[email protected], strip-ansi@^3.0.0, strip-ansi@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
dependencies:
ansi-regex "^2.0.0"

strip-ansi@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f"
dependencies:
ansi-regex "^3.0.0"

strip-bom@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e"
Expand Down

0 comments on commit 552e101

Please sign in to comment.