Skip to content

Commit

Permalink
DEV: updates popperjs 2.0.6 -> 2.9.3 (#14163)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjaffeux committed Aug 26, 2021
1 parent a4684c1 commit f66217c
Show file tree
Hide file tree
Showing 7 changed files with 710 additions and 505 deletions.
2 changes: 1 addition & 1 deletion app/assets/javascripts/discourse/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@ember/optional-features": "^1.1.0",
"@ember/test-helpers": "^2.2.0",
"@glimmer/component": "^1.0.0",
"@popperjs/core": "^2.4.4",
"@popperjs/core": "2.9.3",
"@uppy/aws-s3": "^1.7.12",
"@uppy/aws-s3-multipart": "^1.8.18",
"@uppy/core": "^1.19.2",
Expand Down
10 changes: 8 additions & 2 deletions app/assets/javascripts/select-kit/addon/components/select-kit.js
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,10 @@ export default Component.extend(
phase: "beforeWrite",
requires: ["computeStyles"],
fn: ({ state }) => {
state.styles.popper.minWidth = `${state.rects.reference.width}px`;
state.styles.popper.minWidth = `${Math.max(
state.rects.reference.width,
220
)}px`;

if (state.rects.reference.width >= 300) {
state.styles.popper.maxWidth = `${state.rects.reference.width}px`;
Expand All @@ -934,7 +937,10 @@ export default Component.extend(
}
},
effect: ({ state }) => {
state.elements.popper.style.minWidth = `${state.elements.reference.offsetWidth}px`;
state.elements.popper.style.minWidth = `${Math.max(
state.elements.reference.offsetWidth,
220
)}px`;

if (state.elements.reference.offsetWidth >= 300) {
state.elements.popper.style.maxWidth = `${state.elements.reference.offsetWidth}px`;
Expand Down
8 changes: 4 additions & 4 deletions app/assets/javascripts/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1215,10 +1215,10 @@
"@nodelib/fs.scandir" "2.1.4"
fastq "^1.6.0"

"@popperjs/core@^2.4.4":
version "2.9.2"
resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.9.2.tgz#adea7b6953cbb34651766b0548468e743c6a2353"
integrity sha512-VZMYa7+fXHdwIq1TDhSXoVmSPEGM/aa+6Aiq3nVVJ9bXr24zScr+NlKFKC3iPljA7ho/GAZr+d2jOf5GIRC30Q==
"@popperjs/core@2.9.3":
version "2.9.3"
resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.9.3.tgz#8b68da1ebd7fc603999cf6ebee34a4899a14b88e"
integrity sha512-xDu17cEfh7Kid/d95kB6tZsLOmSWKCZKtprnhVepjsSaCij+lM3mItSJDuuHDMbCWTh8Ejmebwb+KONcCJ0eXQ==

"@simple-dom/interface@^1.4.0":
version "1.4.0"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"@fortawesome/fontawesome-free": "5.11.2",
"@highlightjs/cdn-assets": "^10.6.0",
"@json-editor/json-editor": "^2.5.2",
"@popperjs/core": "v2.0.6",
"@popperjs/core": "v2.9.3",
"@uppy/aws-s3": "^1.7.12",
"@uppy/aws-s3-multipart": "^1.8.18",
"@uppy/core": "^1.19.2",
Expand Down
2 changes: 1 addition & 1 deletion public/popper.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit f66217c

Please sign in to comment.