-
Notifications
You must be signed in to change notification settings - Fork 27
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
Added esc event listener to useEffect #2044
Added esc event listener to useEffect #2044
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small change needs to be made to prevent these listeners from being added when they are not needed.
@@ -44,6 +44,22 @@ export const LeadArtPresentation = (props) => { | |||
viewportPercentage = 65 | |||
} = customFields; | |||
|
|||
useEffect(() => { | |||
if (document.fullscreenEnabled) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We only need these listeners if the lead art type is image
, could you add a check for that? We get the lead art way down on line 278, so that should be moved up before this useEffect
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vgalatro Added the check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry if my previous message wasn't clear, but the definitions for lead_art
and leadArtContent
should have been moved to the top of the component. Having the useEffect
hook that far down can lead to invariant violations in React.
const lead_art = content?.promo_items?.lead_art || content?.promo_items?.basic || {}; | ||
const leadArtContent = getLeadArtContent(lead_art); | ||
|
||
useEffect(() => { | ||
if(leadArtContent?.type === "image"){ | ||
if (document.fullscreenEnabled) { | ||
document.addEventListener("fullscreenchange", () => { | ||
if (!document.fullscreenElement) { | ||
setIsOpen(false); | ||
} | ||
}); | ||
} else if (document.webkitFullscreenEnabled) { | ||
document.addEventListener("webkitfullscreenchange", () => { | ||
if (!document.webkitFullscreenElement) { | ||
setIsOpen(false); | ||
} | ||
}) | ||
} | ||
} | ||
}, [leadArtContent]); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whole block should be towards the top of this component, right after the variables are pulled out of customFields. React hooks need to be before any code that can cause a return or, as in this case, code that could throw an error (the try/catch for the adblock).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved it here because useEffect is depending on lead_art,
leadArtContent
and getLeadArtContent
. So I moved it after they defined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vgalatro Moved UseEffect to top
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Good call on using useMemo
.
4da53be
into
arc-themes-release-version-2.3.0
* Bump @babel/preset-react from 7.23.3 to 7.24.1 (#2050) Bumps [@babel/preset-react](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-react) from 7.23.3 to 7.24.1. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.24.1/packages/babel-preset-react) --- updated-dependencies: - dependency-name: "@babel/preset-react" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Added esc event listener to useEffect (#2044) * Added esc event listener to useEffect --------- Co-authored-by: Malavika Koppula <mkreddy1110@gmail.com> * Added overflow to section-title links (#2027) * Added flex to section-title links --------- Co-authored-by: Malavika Koppula <mkreddy1110@gmail.com> * Bump algoliasearch from 4.23.1 to 4.23.2 (#2057) Bumps [algoliasearch](https://github.com/algolia/algoliasearch-client-javascript) from 4.23.1 to 4.23.2. - [Release notes](https://github.com/algolia/algoliasearch-client-javascript/releases) - [Changelog](https://github.com/algolia/algoliasearch-client-javascript/blob/master/CHANGELOG.md) - [Commits](algolia/algoliasearch-client-javascript@4.23.1...4.23.2) --- updated-dependencies: - dependency-name: algoliasearch dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump eslint-plugin-react from 7.33.2 to 7.34.1 (#2062) Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.33.2 to 7.34.1. - [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases) - [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/v7.34.1/CHANGELOG.md) - [Commits](jsx-eslint/eslint-plugin-react@v7.33.2...v7.34.1) --- updated-dependencies: - dependency-name: eslint-plugin-react dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump glob from 10.3.10 to 10.3.12 (#2063) Bumps [glob](https://github.com/isaacs/node-glob) from 10.3.10 to 10.3.12. - [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md) - [Commits](isaacs/node-glob@v10.3.10...v10.3.12) --- updated-dependencies: - dependency-name: glob dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Manual promo blocks now respect focal point (#1996) * add focal point code and tests * fix eslint errors * fix formatting * fix formatting p2 * shorten PR template based on eng sync discussions (#2065) * ASUB-8201 Sign In with Apple (#2067) * Sign In with Apple * fixing linting and tests * fixing test & linting * fixing linting errors * removing update from package.json * fixing linting errors * disable eslint warnings * fixing warnings * fixing sintax * removing keys * removing only * fixing linting errors * added dd-service-catalog.yml (#2089) * added dd-service-catalog.yml * updated infrastructure * ASUB-8195 Sign up with reCaptcha (#2068) * sign up with reCaptcha * fixing linting and tests * fixing linting errors * fixing linting errors * Lokalize-translation 2.3.0 (#2092) * lokalize-translation 2.3.0 * attending feedback * THEMES-1066: Update Storybook to v8 (#2090) * THEMES-1066: updated versions of storybook and chromatic to the latest. * THEMES-1066: fixed linting errors * THEMES-1066 adjusted configs so that storybook could build without errors. * THEMES-1066 remove addon-knobs * THEMES-1066: removing more deprecated packages. * THEMES-1066: added .babelrc * THEMES-1066: moved babel config to main.js * version bump * added alias overrides * Fixed intro page * THEMES-1066: fixed webpack/babel config * THEMES-1066: restore babel.config.js * THEMES-1066: restore babel.config.js * THEMES-1066: added styling storybook addon * THEMES-1066: updated preview to just use news.scss * THEMES-1066: fixed breaking stories and updated news.scss. * THEMES-1066: version bump for storybook * THEMES-1066: corrected whitespace * THEMES-1066: Updating option for chromatic action. * THEMES-1066: updated stylelint to hopefully fix the UI Tests check * THEMES-1066: removed jsx from stylelint action input. * THEMES-1066: added env vars to chromatic action * THEMES-1066: removing test vars from workflow file. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: malavikakoppula <83021791+malavikakoppula@users.noreply.github.com> Co-authored-by: Malavika Koppula <mkreddy1110@gmail.com> Co-authored-by: Anna Sherman <sherman.anna@gmail.com> Co-authored-by: LauraPinilla <54566275+LauraPinilla@users.noreply.github.com> Co-authored-by: blakeganderson <85515364+blakeganderson@users.noreply.github.com>
* Bump @babel/preset-react from 7.23.3 to 7.24.1 (#2050) Bumps [@babel/preset-react](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-react) from 7.23.3 to 7.24.1. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.24.1/packages/babel-preset-react) --- updated-dependencies: - dependency-name: "@babel/preset-react" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Added esc event listener to useEffect (#2044) * Added esc event listener to useEffect --------- Co-authored-by: Malavika Koppula <mkreddy1110@gmail.com> * Added overflow to section-title links (#2027) * Added flex to section-title links --------- Co-authored-by: Malavika Koppula <mkreddy1110@gmail.com> * Bump algoliasearch from 4.23.1 to 4.23.2 (#2057) Bumps [algoliasearch](https://github.com/algolia/algoliasearch-client-javascript) from 4.23.1 to 4.23.2. - [Release notes](https://github.com/algolia/algoliasearch-client-javascript/releases) - [Changelog](https://github.com/algolia/algoliasearch-client-javascript/blob/master/CHANGELOG.md) - [Commits](algolia/algoliasearch-client-javascript@4.23.1...4.23.2) --- updated-dependencies: - dependency-name: algoliasearch dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump eslint-plugin-react from 7.33.2 to 7.34.1 (#2062) Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.33.2 to 7.34.1. - [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases) - [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/v7.34.1/CHANGELOG.md) - [Commits](jsx-eslint/eslint-plugin-react@v7.33.2...v7.34.1) --- updated-dependencies: - dependency-name: eslint-plugin-react dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump glob from 10.3.10 to 10.3.12 (#2063) Bumps [glob](https://github.com/isaacs/node-glob) from 10.3.10 to 10.3.12. - [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md) - [Commits](isaacs/node-glob@v10.3.10...v10.3.12) --- updated-dependencies: - dependency-name: glob dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Manual promo blocks now respect focal point (#1996) * add focal point code and tests * fix eslint errors * fix formatting * fix formatting p2 * shorten PR template based on eng sync discussions (#2065) * ASUB-8201 Sign In with Apple (#2067) * Sign In with Apple * fixing linting and tests * fixing test & linting * fixing linting errors * removing update from package.json * fixing linting errors * disable eslint warnings * fixing warnings * fixing sintax * removing keys * removing only * fixing linting errors * added dd-service-catalog.yml (#2089) * added dd-service-catalog.yml * updated infrastructure * ASUB-8195 Sign up with reCaptcha (#2068) * sign up with reCaptcha * fixing linting and tests * fixing linting errors * fixing linting errors * Lokalize-translation 2.3.0 (#2092) * lokalize-translation 2.3.0 * attending feedback * THEMES-1066: Update Storybook to v8 (#2090) * THEMES-1066: updated versions of storybook and chromatic to the latest. * THEMES-1066: fixed linting errors * THEMES-1066 adjusted configs so that storybook could build without errors. * THEMES-1066 remove addon-knobs * THEMES-1066: removing more deprecated packages. * THEMES-1066: added .babelrc * THEMES-1066: moved babel config to main.js * version bump * added alias overrides * Fixed intro page * THEMES-1066: fixed webpack/babel config * THEMES-1066: restore babel.config.js * THEMES-1066: restore babel.config.js * THEMES-1066: added styling storybook addon * THEMES-1066: updated preview to just use news.scss * THEMES-1066: fixed breaking stories and updated news.scss. * THEMES-1066: version bump for storybook * THEMES-1066: corrected whitespace * THEMES-1066: Updating option for chromatic action. * THEMES-1066: updated stylelint to hopefully fix the UI Tests check * THEMES-1066: removed jsx from stylelint action input. * THEMES-1066: added env vars to chromatic action * THEMES-1066: removing test vars from workflow file. * add subscription profile management feature and cancel/resub flows * address lint errors * fix some lint issues * update some tests * auto fix styles lint * fix some styles * fix lint errors * update tests * add more test * use icons from components repo * add tests * fix inactive sub card * address feedback * remove eslint disable next line --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: malavikakoppula <83021791+malavikakoppula@users.noreply.github.com> Co-authored-by: Malavika Koppula <mkreddy1110@gmail.com> Co-authored-by: Anna Sherman <sherman.anna@gmail.com> Co-authored-by: LauraPinilla <54566275+LauraPinilla@users.noreply.github.com> Co-authored-by: blakeganderson <85515364+blakeganderson@users.noreply.github.com> Co-authored-by: Vito Galatro <vgalatro@users.noreply.github.com>
* add login without password * add login without password * Bump @babel/preset-react from 7.23.3 to 7.24.1 (#2050) Bumps [@babel/preset-react](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-react) from 7.23.3 to 7.24.1. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.24.1/packages/babel-preset-react) --- updated-dependencies: - dependency-name: "@babel/preset-react" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Added esc event listener to useEffect (#2044) * Added esc event listener to useEffect --------- Co-authored-by: Malavika Koppula <mkreddy1110@gmail.com> * Added overflow to section-title links (#2027) * Added flex to section-title links --------- Co-authored-by: Malavika Koppula <mkreddy1110@gmail.com> * Bump algoliasearch from 4.23.1 to 4.23.2 (#2057) Bumps [algoliasearch](https://github.com/algolia/algoliasearch-client-javascript) from 4.23.1 to 4.23.2. - [Release notes](https://github.com/algolia/algoliasearch-client-javascript/releases) - [Changelog](https://github.com/algolia/algoliasearch-client-javascript/blob/master/CHANGELOG.md) - [Commits](algolia/algoliasearch-client-javascript@4.23.1...4.23.2) --- updated-dependencies: - dependency-name: algoliasearch dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump eslint-plugin-react from 7.33.2 to 7.34.1 (#2062) Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.33.2 to 7.34.1. - [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases) - [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/v7.34.1/CHANGELOG.md) - [Commits](jsx-eslint/eslint-plugin-react@v7.33.2...v7.34.1) --- updated-dependencies: - dependency-name: eslint-plugin-react dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump glob from 10.3.10 to 10.3.12 (#2063) Bumps [glob](https://github.com/isaacs/node-glob) from 10.3.10 to 10.3.12. - [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md) - [Commits](isaacs/node-glob@v10.3.10...v10.3.12) --- updated-dependencies: - dependency-name: glob dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Manual promo blocks now respect focal point (#1996) * add focal point code and tests * fix eslint errors * fix formatting * fix formatting p2 * shorten PR template based on eng sync discussions (#2065) * add onetime password * ASUB-8201 Sign In with Apple (#2067) * Sign In with Apple * fixing linting and tests * fixing test & linting * fixing linting errors * removing update from package.json * fixing linting errors * disable eslint warnings * fixing warnings * fixing sintax * removing keys * removing only * fixing linting errors * add sucess page and recaptcha * add translations * update intl.json * add tests for ota feature * remove act * lint fixes * lint fixes * lint fixes * update translation to sort by order * revision changes * remove extra error message * lint fix * update styling fontsize for heading and remove padding * fix for button not showing up * fix for button not showing up * update default url --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: malavikakoppula <83021791+malavikakoppula@users.noreply.github.com> Co-authored-by: Malavika Koppula <mkreddy1110@gmail.com> Co-authored-by: Anna Sherman <sherman.anna@gmail.com> Co-authored-by: LauraPinilla <54566275+LauraPinilla@users.noreply.github.com>
* Bump @babel/preset-react from 7.23.3 to 7.24.1 (#2050) Bumps [@babel/preset-react](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-react) from 7.23.3 to 7.24.1. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.24.1/packages/babel-preset-react) --- updated-dependencies: - dependency-name: "@babel/preset-react" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Added esc event listener to useEffect (#2044) * Added esc event listener to useEffect --------- Co-authored-by: Malavika Koppula <mkreddy1110@gmail.com> * Added overflow to section-title links (#2027) * Added flex to section-title links --------- Co-authored-by: Malavika Koppula <mkreddy1110@gmail.com> * Bump algoliasearch from 4.23.1 to 4.23.2 (#2057) Bumps [algoliasearch](https://github.com/algolia/algoliasearch-client-javascript) from 4.23.1 to 4.23.2. - [Release notes](https://github.com/algolia/algoliasearch-client-javascript/releases) - [Changelog](https://github.com/algolia/algoliasearch-client-javascript/blob/master/CHANGELOG.md) - [Commits](algolia/algoliasearch-client-javascript@4.23.1...4.23.2) --- updated-dependencies: - dependency-name: algoliasearch dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump eslint-plugin-react from 7.33.2 to 7.34.1 (#2062) Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.33.2 to 7.34.1. - [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases) - [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/v7.34.1/CHANGELOG.md) - [Commits](jsx-eslint/eslint-plugin-react@v7.33.2...v7.34.1) --- updated-dependencies: - dependency-name: eslint-plugin-react dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump glob from 10.3.10 to 10.3.12 (#2063) Bumps [glob](https://github.com/isaacs/node-glob) from 10.3.10 to 10.3.12. - [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md) - [Commits](isaacs/node-glob@v10.3.10...v10.3.12) --- updated-dependencies: - dependency-name: glob dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Manual promo blocks now respect focal point (#1996) * add focal point code and tests * fix eslint errors * fix formatting * fix formatting p2 * shorten PR template based on eng sync discussions (#2065) * Added check on credits length * ASUB-8201 Sign In with Apple (#2067) * Sign In with Apple * fixing linting and tests * fixing test & linting * fixing linting errors * removing update from package.json * fixing linting errors * disable eslint warnings * fixing warnings * fixing sintax * removing keys * removing only * fixing linting errors * added dd-service-catalog.yml (#2089) * added dd-service-catalog.yml * updated infrastructure * ASUB-8195 Sign up with reCaptcha (#2068) * sign up with reCaptcha * fixing linting and tests * fixing linting errors * fixing linting errors * Lokalize-translation 2.3.0 (#2092) * lokalize-translation 2.3.0 * attending feedback * THEMES-1066: Update Storybook to v8 (#2090) * THEMES-1066: updated versions of storybook and chromatic to the latest. * THEMES-1066: fixed linting errors * THEMES-1066 adjusted configs so that storybook could build without errors. * THEMES-1066 remove addon-knobs * THEMES-1066: removing more deprecated packages. * THEMES-1066: added .babelrc * THEMES-1066: moved babel config to main.js * version bump * added alias overrides * Fixed intro page * THEMES-1066: fixed webpack/babel config * THEMES-1066: restore babel.config.js * THEMES-1066: restore babel.config.js * THEMES-1066: added styling storybook addon * THEMES-1066: updated preview to just use news.scss * THEMES-1066: fixed breaking stories and updated news.scss. * THEMES-1066: version bump for storybook * THEMES-1066: corrected whitespace * THEMES-1066: Updating option for chromatic action. * THEMES-1066: updated stylelint to hopefully fix the UI Tests check * THEMES-1066: removed jsx from stylelint action input. * THEMES-1066: added env vars to chromatic action * THEMES-1066: removing test vars from workflow file. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Malavika Koppula <mkreddy1110@gmail.com> Co-authored-by: Anna Sherman <sherman.anna@gmail.com> Co-authored-by: LauraPinilla <54566275+LauraPinilla@users.noreply.github.com> Co-authored-by: blakeganderson <85515364+blakeganderson@users.noreply.github.com> Co-authored-by: Vito Galatro <vgalatro@users.noreply.github.com>
* [THEMES-1884]Added check on credits length (#2077) * Bump @babel/preset-react from 7.23.3 to 7.24.1 (#2050) Bumps [@babel/preset-react](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-react) from 7.23.3 to 7.24.1. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.24.1/packages/babel-preset-react) --- updated-dependencies: - dependency-name: "@babel/preset-react" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Added esc event listener to useEffect (#2044) * Added esc event listener to useEffect --------- Co-authored-by: Malavika Koppula <mkreddy1110@gmail.com> * Added overflow to section-title links (#2027) * Added flex to section-title links --------- Co-authored-by: Malavika Koppula <mkreddy1110@gmail.com> * Bump algoliasearch from 4.23.1 to 4.23.2 (#2057) Bumps [algoliasearch](https://github.com/algolia/algoliasearch-client-javascript) from 4.23.1 to 4.23.2. - [Release notes](https://github.com/algolia/algoliasearch-client-javascript/releases) - [Changelog](https://github.com/algolia/algoliasearch-client-javascript/blob/master/CHANGELOG.md) - [Commits](algolia/algoliasearch-client-javascript@4.23.1...4.23.2) --- updated-dependencies: - dependency-name: algoliasearch dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump eslint-plugin-react from 7.33.2 to 7.34.1 (#2062) Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.33.2 to 7.34.1. - [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases) - [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/v7.34.1/CHANGELOG.md) - [Commits](jsx-eslint/eslint-plugin-react@v7.33.2...v7.34.1) --- updated-dependencies: - dependency-name: eslint-plugin-react dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump glob from 10.3.10 to 10.3.12 (#2063) Bumps [glob](https://github.com/isaacs/node-glob) from 10.3.10 to 10.3.12. - [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md) - [Commits](isaacs/node-glob@v10.3.10...v10.3.12) --- updated-dependencies: - dependency-name: glob dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Manual promo blocks now respect focal point (#1996) * add focal point code and tests * fix eslint errors * fix formatting * fix formatting p2 * shorten PR template based on eng sync discussions (#2065) * Added check on credits length * ASUB-8201 Sign In with Apple (#2067) * Sign In with Apple * fixing linting and tests * fixing test & linting * fixing linting errors * removing update from package.json * fixing linting errors * disable eslint warnings * fixing warnings * fixing sintax * removing keys * removing only * fixing linting errors * added dd-service-catalog.yml (#2089) * added dd-service-catalog.yml * updated infrastructure * ASUB-8195 Sign up with reCaptcha (#2068) * sign up with reCaptcha * fixing linting and tests * fixing linting errors * fixing linting errors * Lokalize-translation 2.3.0 (#2092) * lokalize-translation 2.3.0 * attending feedback * THEMES-1066: Update Storybook to v8 (#2090) * THEMES-1066: updated versions of storybook and chromatic to the latest. * THEMES-1066: fixed linting errors * THEMES-1066 adjusted configs so that storybook could build without errors. * THEMES-1066 remove addon-knobs * THEMES-1066: removing more deprecated packages. * THEMES-1066: added .babelrc * THEMES-1066: moved babel config to main.js * version bump * added alias overrides * Fixed intro page * THEMES-1066: fixed webpack/babel config * THEMES-1066: restore babel.config.js * THEMES-1066: restore babel.config.js * THEMES-1066: added styling storybook addon * THEMES-1066: updated preview to just use news.scss * THEMES-1066: fixed breaking stories and updated news.scss. * THEMES-1066: version bump for storybook * THEMES-1066: corrected whitespace * THEMES-1066: Updating option for chromatic action. * THEMES-1066: updated stylelint to hopefully fix the UI Tests check * THEMES-1066: removed jsx from stylelint action input. * THEMES-1066: added env vars to chromatic action * THEMES-1066: removing test vars from workflow file. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Malavika Koppula <mkreddy1110@gmail.com> Co-authored-by: Anna Sherman <sherman.anna@gmail.com> Co-authored-by: LauraPinilla <54566275+LauraPinilla@users.noreply.github.com> Co-authored-by: blakeganderson <85515364+blakeganderson@users.noreply.github.com> Co-authored-by: Vito Galatro <vgalatro@users.noreply.github.com> * [Themes 1884 ] fix (#2143) * Added FormatAuthors to check --------- Co-authored-by: Malavika Koppula <mkreddy1110@gmail.com> * updated package-lock --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Malavika Koppula <mkreddy1110@gmail.com> Co-authored-by: Anna Sherman <sherman.anna@gmail.com> Co-authored-by: LauraPinilla <54566275+LauraPinilla@users.noreply.github.com> Co-authored-by: blakeganderson <85515364+blakeganderson@users.noreply.github.com> Co-authored-by: Vito Galatro <vgalatro@users.noreply.github.com>
Description
The "Lead Art - Arc Block" fullscreen-exit button and the image-wrapper remain visible after I press the 'escape' key to exit from the fullscreen view of an image.
Sample page: https://cetest-cetest-sandbox.web.arc-cdn.net/2024/01/24/san-diego-wild-parrots/
Jira Ticket
Acceptance Criteria
Close button should not appear when image is not in fullscreen
Test Steps
git checkout THEMES-1673-close-icon-fix
npx fusion start -f -l @wpmedia/lead-art-block
Dependencies or Side Effects
Examples of dependencies or side effects are:
Author Checklist
The author of the PR should fill out the following sections to ensure this PR is ready for review.
npm run lint
to check for errors. Often,npm run lint:fix
will fix those errors and warnings.npm run test:coverage
to see your progress.npm run test
, made sure all tests are passingplease explain why (so that we can fix it whenever it gets refactored).
Reviewer Checklist
The reviewer of the PR should copy-paste this template into the review comments on review.