();
- const pollPopupHeight = useCallback(
- (interval = 200) => {
- if (!polling) {
- return;
- }
-
- // Save the reference to the browser timeout we create.
- setPollTimeout(
- // Create the timeout to fire after the interval.
- setTimeout(() => {
- // Using requestAnimationFrame, resize the popup, and reschedule the
- // resize timeout again in another interval.
- window.requestAnimationFrame(() => {
- resizePopup();
- pollPopupHeight(interval);
- });
- }, interval)
- );
- },
- [pollTimeout, setPollTimeout, polling]
- );
+ const pollPopupHeight = useCallback((interval = 200) => {
+ // Save the reference to the browser timeout we create.
+ pollTimeout.current =
+ // Create the timeout to fire after the interval.
+ setTimeout(() => {
+ // Using requestAnimationFrame, resize the popup, and reschedule the
+ // resize timeout again in another interval.
+ window.requestAnimationFrame(() => {
+ resizePopup();
+ pollPopupHeight(interval);
+ });
+ }, interval);
+ }, []);
useEffect(() => {
// Poll for popup height changes.
pollPopupHeight();
return () => {
- if (pollTimeout) {
- clearTimeout(pollTimeout);
- setPollTimeout(null);
- setPolling(false);
+ if (pollTimeout.current) {
+ clearTimeout(pollTimeout.current);
+ pollTimeout.current = null;
}
};
- }, [setPollTimeout, setPolling]);
+ }, []);
const ref = useResizeObserver(() => {
resizePopup();
diff --git a/src/core/client/auth/index.html b/src/core/client/auth/index.html
index aaecfbc6e..f68dcd82a 100644
--- a/src/core/client/auth/index.html
+++ b/src/core/client/auth/index.html
@@ -4,7 +4,7 @@
Coral - Auth
-
+
diff --git a/src/core/client/auth/index.tsx b/src/core/client/auth/index.tsx
index b8198709b..a2c2cae04 100644
--- a/src/core/client/auth/index.tsx
+++ b/src/core/client/auth/index.tsx
@@ -1,6 +1,7 @@
import React, { FunctionComponent } from "react";
import ReactDOM from "react-dom";
+import potentiallyInjectAxe from "coral-framework/helpers/potentiallyInjectAxe";
import { createManaged } from "coral-framework/lib/bootstrap";
import App from "./App";
@@ -11,6 +12,8 @@ import localesData from "./locales";
import "coral-ui/theme/variables.css";
async function main() {
+ // Potentially inject react-axe for runtime a11y checks.
+ await potentiallyInjectAxe();
const ManagedCoralContextProvider = await createManaged({
initLocalState,
localesData,
diff --git a/src/core/client/auth/test/__snapshots__/addEmailAddress.spec.tsx.snap b/src/core/client/auth/test/__snapshots__/addEmailAddress.spec.tsx.snap
index 04623482e..7e7bd3fe8 100644
--- a/src/core/client/auth/test/__snapshots__/addEmailAddress.spec.tsx.snap
+++ b/src/core/client/auth/test/__snapshots__/addEmailAddress.spec.tsx.snap
@@ -352,15 +352,15 @@ exports[`renders addEmailAddress view 1`] = `
-
@@ -513,7 +513,7 @@ Your email address will be used to:
-
+
diff --git a/src/core/client/auth/test/__snapshots__/createPassword.spec.tsx.snap b/src/core/client/auth/test/__snapshots__/createPassword.spec.tsx.snap
index e636685ba..1cb265bad 100644
--- a/src/core/client/auth/test/__snapshots__/createPassword.spec.tsx.snap
+++ b/src/core/client/auth/test/__snapshots__/createPassword.spec.tsx.snap
@@ -108,15 +108,15 @@ exports[`renders createPassword view 1`] = `
-
@@ -203,7 +203,7 @@ we require users to create a password.
-
+
diff --git a/src/core/client/auth/test/__snapshots__/createUsername.spec.tsx.snap b/src/core/client/auth/test/__snapshots__/createUsername.spec.tsx.snap
index bcdbbb6d3..a0828ef8c 100644
--- a/src/core/client/auth/test/__snapshots__/createUsername.spec.tsx.snap
+++ b/src/core/client/auth/test/__snapshots__/createUsername.spec.tsx.snap
@@ -84,15 +84,15 @@ exports[`renders createUsername view 1`] = `
-
@@ -155,7 +155,7 @@ exports[`renders createUsername view 1`] = `
-
+
diff --git a/src/core/client/auth/test/__snapshots__/forgotPassword.spec.tsx.snap b/src/core/client/auth/test/__snapshots__/forgotPassword.spec.tsx.snap
index 5d70b5d3d..76f7fa9c8 100644
--- a/src/core/client/auth/test/__snapshots__/forgotPassword.spec.tsx.snap
+++ b/src/core/client/auth/test/__snapshots__/forgotPassword.spec.tsx.snap
@@ -9,18 +9,18 @@ exports[`renders forgot password view 1`] = `
-
+
+
-
@@ -93,7 +93,7 @@ reset your password.
-
+
diff --git a/src/core/client/auth/test/__snapshots__/signIn.spec.tsx.snap b/src/core/client/auth/test/__snapshots__/signIn.spec.tsx.snap
index 7eb8169e6..60d85b0c2 100644
--- a/src/core/client/auth/test/__snapshots__/signIn.spec.tsx.snap
+++ b/src/core/client/auth/test/__snapshots__/signIn.spec.tsx.snap
@@ -275,7 +275,7 @@ exports[`accepts valid email 1`] = `
`;
exports[`auth configuration renders all auth enabled 1`] = `
-
@@ -492,11 +492,11 @@ exports[`auth configuration renders all auth enabled 1`] = `
-
+
`;
exports[`auth configuration renders only some social login enabled 1`] = `
-
@@ -564,7 +564,7 @@ exports[`auth configuration renders only some social login enabled 1`] = `
-
+
`;
exports[`checks for invalid email 1`] = `
@@ -726,7 +726,7 @@ exports[`renders sign in view 1`] = `
-
+
@@ -737,12 +737,12 @@ exports[`renders sign in view 1`] = `
>
to join the conversation
-
+
-
+
+
-
@@ -891,7 +891,7 @@ exports[`renders sign in view 1`] = `
className="Box-root HorizontalGutter-root HorizontalGutter-full"
/>
-
+
@@ -904,7 +904,7 @@ exports[`renders sign in view with error 1`] = `
-
+
@@ -915,12 +915,12 @@ exports[`renders sign in view with error 1`] = `
>
to join the conversation
-
+
-
+
+
-
@@ -1076,7 +1076,7 @@ exports[`renders sign in view with error 1`] = `
className="Box-root HorizontalGutter-root HorizontalGutter-full"
/>
-
+
`;
diff --git a/src/core/client/auth/test/__snapshots__/signUp.spec.tsx.snap b/src/core/client/auth/test/__snapshots__/signUp.spec.tsx.snap
index 3a7ecc9e0..5cbb89693 100644
--- a/src/core/client/auth/test/__snapshots__/signUp.spec.tsx.snap
+++ b/src/core/client/auth/test/__snapshots__/signUp.spec.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`accepts correct password 1`] = `
-
@@ -180,11 +180,11 @@ exports[`accepts correct password 1`] = `
className="Box-root HorizontalGutter-root HorizontalGutter-full"
/>
-
+
`;
exports[`accepts valid email 1`] = `
-
@@ -363,11 +363,11 @@ exports[`accepts valid email 1`] = `
className="Box-root HorizontalGutter-root HorizontalGutter-full"
/>
-
+
`;
exports[`accepts valid username 1`] = `
-
@@ -546,11 +546,11 @@ exports[`accepts valid username 1`] = `
className="Box-root HorizontalGutter-root HorizontalGutter-full"
/>
-
+
`;
exports[`auth configuration renders all auth enabled 1`] = `
-
@@ -788,11 +788,11 @@ exports[`auth configuration renders all auth enabled 1`] = `
-
+
`;
exports[`auth configuration renders only some social login enabled 1`] = `
-
@@ -860,11 +860,11 @@ exports[`auth configuration renders only some social login enabled 1`] = `
-
+
`;
exports[`checks for invalid characters in username 1`] = `
-
@@ -1056,11 +1056,11 @@ exports[`checks for invalid characters in username 1`] = `
className="Box-root HorizontalGutter-root HorizontalGutter-full"
/>
-
+
`;
exports[`checks for invalid email 1`] = `
-
@@ -1252,11 +1252,11 @@ exports[`checks for invalid email 1`] = `
className="Box-root HorizontalGutter-root HorizontalGutter-full"
/>
-
+
`;
exports[`checks for too long username 1`] = `
-
@@ -1448,11 +1448,11 @@ exports[`checks for too long username 1`] = `
className="Box-root HorizontalGutter-root HorizontalGutter-full"
/>
-
+
`;
exports[`checks for too short password 1`] = `
-
@@ -1644,11 +1644,11 @@ exports[`checks for too short password 1`] = `
className="Box-root HorizontalGutter-root HorizontalGutter-full"
/>
-
+
`;
exports[`checks for too short username 1`] = `
-
@@ -1840,7 +1840,7 @@ exports[`checks for too short username 1`] = `
className="Box-root HorizontalGutter-root HorizontalGutter-full"
/>
-
+
`;
exports[`renders sign up form 1`] = `
@@ -1852,7 +1852,7 @@ exports[`renders sign up form 1`] = `
-
+
@@ -1863,12 +1863,12 @@ exports[`renders sign up form 1`] = `
>
to join the conversation
-
+
-
+
+
-
@@ -2038,14 +2038,14 @@ exports[`renders sign up form 1`] = `
className="Box-root HorizontalGutter-root HorizontalGutter-full"
/>
-
+
`;
exports[`shows error when submitting empty form 1`] = `
-
@@ -2237,11 +2237,11 @@ exports[`shows error when submitting empty form 1`] = `
className="Box-root HorizontalGutter-root HorizontalGutter-full"
/>
-
+
`;
exports[`shows server error 1`] = `
-
@@ -2401,11 +2401,11 @@ exports[`shows server error 1`] = `
className="Box-root HorizontalGutter-root HorizontalGutter-full"
/>
-
+
`;
exports[`submits form successfully 1`] = `
-
@@ -2558,5 +2558,5 @@ exports[`submits form successfully 1`] = `
className="Box-root HorizontalGutter-root HorizontalGutter-full"
/>
-
+
`;
diff --git a/src/core/client/count/index.html b/src/core/client/count/index.html
index f69377825..ad987ecfd 100644
--- a/src/core/client/count/index.html
+++ b/src/core/client/count/index.html
@@ -4,7 +4,7 @@
Coral - Count
-
+
diff --git a/src/core/client/embed/index.html b/src/core/client/embed/index.html
index 3bd2327e9..838c62c34 100644
--- a/src/core/client/embed/index.html
+++ b/src/core/client/embed/index.html
@@ -4,7 +4,7 @@
Coral 5.0 – Embed Stream
-
+