From 56f49d99bb84bec7e396fb3f3cf0fad5ad5c2b78 Mon Sep 17 00:00:00 2001 From: malavikakoppula <83021791+malavikakoppula@users.noreply.github.com> Date: Thu, 16 May 2024 12:10:01 -0400 Subject: [PATCH] [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] 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 * Added overflow to section-title links (#2027) * Added flex to section-title links --------- Co-authored-by: Malavika Koppula * 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](https://github.com/algolia/algoliasearch-client-javascript/compare/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] 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](https://github.com/jsx-eslint/eslint-plugin-react/compare/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] 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](https://github.com/isaacs/node-glob/compare/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] 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] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Malavika Koppula Co-authored-by: Anna Sherman 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 --- blocks/medium-promo-block/features/medium-promo/default.jsx | 2 +- .../features/top-table-list/_children/extra-large.jsx | 2 +- .../features/top-table-list/_children/medium.jsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/blocks/medium-promo-block/features/medium-promo/default.jsx b/blocks/medium-promo-block/features/medium-promo/default.jsx index daa78ec9ed..aef61ddd16 100644 --- a/blocks/medium-promo-block/features/medium-promo/default.jsx +++ b/blocks/medium-promo-block/features/medium-promo/default.jsx @@ -159,7 +159,7 @@ const MediumPromo = ({ customFields }) => { return null; } - const hasAuthors = showByline ? content?.credits?.by && content?.credits?.by.length : null; + const hasAuthors = showByline ? content?.credits?.by && content?.credits?.by?.length : null; const contentDescription = showDescription ? content?.description?.basic : null; const contentHeading = showHeadline ? content?.headlines?.basic : null; const contentUrl = content?.websites?.[arcSite]?.website_url; diff --git a/blocks/top-table-list-block/features/top-table-list/_children/extra-large.jsx b/blocks/top-table-list-block/features/top-table-list/_children/extra-large.jsx index c45a5651b2..ec116ae704 100644 --- a/blocks/top-table-list-block/features/top-table-list/_children/extra-large.jsx +++ b/blocks/top-table-list-block/features/top-table-list/_children/extra-large.jsx @@ -85,7 +85,7 @@ const ExtraLarge = (props) => { const contentHeading = showHeadlineXL ? element?.headlines?.basic : null; const contentUrl = element?.websites?.[arcSite]?.website_url; const embedMarkup = playVideoInPlaceXL && getVideoFromANS(element); - const hasAuthors = showBylineXL && element?.credits?.by.length > 0; + const hasAuthors = showBylineXL && element?.credits?.by?.length > 0; const ansImage = getImageFromANS(element); const imageParams = element && ansImage diff --git a/blocks/top-table-list-block/features/top-table-list/_children/medium.jsx b/blocks/top-table-list-block/features/top-table-list/_children/medium.jsx index 8af253a0a3..11499ccd45 100644 --- a/blocks/top-table-list-block/features/top-table-list/_children/medium.jsx +++ b/blocks/top-table-list-block/features/top-table-list/_children/medium.jsx @@ -54,7 +54,7 @@ const Medium = (props) => { const showBottomBorder = typeof showBottomBorderMD === "undefined" ? true : showBottomBorderMD; - const hasAuthors = showBylineMD ? element?.credits?.by && element?.credits?.by.length : null; + const hasAuthors = showBylineMD ? element?.credits?.by && element?.credits?.by?.length : null; const contentDescription = showDescriptionMD ? element?.description?.basic : null; const contentHeading = showHeadlineMD ? element?.headlines?.basic : null; const contentUrl = element?.websites?.[arcSite]?.website_url;