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

[CORL-1412] Integrate giphy web SDK #3255

Merged
merged 11 commits into from
Nov 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
434 changes: 434 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@
"@coralproject/npm-run-all": "^4.1.5",
"@coralproject/rte": "^1.3.0",
"@fluent/react": "^0.11.1",
"@giphy/js-fetch-api": "^1.7.0",
"@giphy/react-components": "^1.9.1",
"@intervolga/optimize-cssnano-plugin": "^1.0.6",
"@sentry/react": "^5.26.0",
"@types/archiver": "^3.1.0",
Expand Down Expand Up @@ -379,6 +381,8 @@
"webpack-bundle-analyzer": "^3.8.0",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.0",
"react-use": "^15.3.4",
"use-resize-observer": "^6.1.0",
"whatwg-fetch": "^3.4.0"
},
"dependencies-pins-documentation": {
Expand Down
6 changes: 3 additions & 3 deletions src/core/client/auth/hooks/useResizePopup.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useCallback, useEffect, useRef } from "react";

import { useResizeObserver } from "coral-framework/hooks";
import useResizeObserver from "use-resize-observer/polyfilled";

import resizePopup from "../dom/resizePopup";

Expand Down Expand Up @@ -39,8 +39,8 @@ export default function useResizePopup() {
};
}, [pollPopupHeight]);

const ref = useResizeObserver(() => {
resizePopup();
const { ref } = useResizeObserver<HTMLDivElement>({
onResize: () => resizePopup(),
});
return ref;
}
1 change: 0 additions & 1 deletion src/core/client/framework/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export { default as usePrevious } from "./usePrevious";
export { default as useEffectWhenChanged } from "./useEffectWhenChanged";
export { default as useUUID } from "./useUUID";
export { default as useToken } from "./useToken";
export { default as useResizeObserver } from "./useResizeObserver";
export { default as useToggleState } from "./useToggleState";
export { default as useLive } from "./useLive";
export { default as useVisibilityState } from "./useVisibilityState";
28 changes: 0 additions & 28 deletions src/core/client/framework/hooks/useResizeObserver.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,8 @@ const enhanced = withContext(({ sessionStorage, browserInfo }) => ({
}
giphy {
enabled
key
maxRating
}
external {
enabled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function createDefaultProps(add: DeepPartial<Props> = {}): Props {
max: 100,
},
media: {
giphy: { enabled: false },
giphy: { enabled: false, key: "", maxRating: "" },
twitter: { enabled: false },
youtube: { enabled: false },
external: { enabled: false },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,8 @@ const enhanced = withContext(({ sessionStorage, browserInfo }) => ({
}
giphy {
enabled
key
maxRating
}
external {
enabled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ exports[`renders correctly 1`] = `
},
"giphy": Object {
"enabled": false,
"key": "",
"maxRating": "",
},
"twitter": Object {
"enabled": false,
Expand Down Expand Up @@ -46,6 +48,8 @@ exports[`renders when commenting has been disabled 1`] = `
},
"giphy": Object {
"enabled": false,
"key": "",
"maxRating": "",
},
"twitter": Object {
"enabled": false,
Expand Down Expand Up @@ -79,6 +83,8 @@ exports[`renders when story has been closed 1`] = `
},
"giphy": Object {
"enabled": false,
"key": "",
"maxRating": "",
},
"twitter": Object {
"enabled": false,
Expand Down Expand Up @@ -117,6 +123,8 @@ exports[`renders with initialValues 1`] = `
},
"giphy": Object {
"enabled": false,
"key": "",
"maxRating": "",
},
"twitter": Object {
"enabled": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,8 @@
display: block;
max-width: 100%;
}

.grid {
max-height: 300px;
overflow: scroll;
}
Loading