Skip to content

Conversation

MarBert
Copy link
Collaborator

@MarBert MarBert commented Oct 15, 2025

List of Changes

Generalise filtered grid for use cases, tutorials and webinars

Motivation and Context

How Has This Been Tested?

lolcalhost

Screenshots (if appropriate):

Types of changes

  • Chore (nothing changes by a user perspective)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Copy link

changeset-bot bot commented Oct 15, 2025

🦋 Changeset detected

Latest commit: 45d593c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
nextjs-website Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

# Conflicts:
#	apps/nextjs-website/src/components/organisms/FilteredGridLayout/FilteredGridLayout.tsx
#	apps/nextjs-website/src/components/organisms/TutorialsList/TutorialsList.tsx
Copy link
Contributor

github-actions bot commented Oct 17, 2025

Jira Pull Request Link

This Pull Request refers to the following Jira issue DEV-3015

<TutorialsList
<FilteredGridLayout
items={mappedTutorials}
tags={product.tags || []}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would put a default value for tags on the FilteredGridLayout component itself allowing it to take undefined or falsey tags and handle the case with a fallback to empty array in the component

Suggested change
tags={product.tags || []}
tags={product.tags}

<UseCaseList
<FilteredGridLayout
items={mappedUseCases}
tags={product.tags || []}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
tags={product.tags || []}
tags={product.tags}

readonly useCases: readonly UseCase[];
type FilteredGridLayoutProps = {
readonly items: readonly (INewsroomItem & { tags: readonly Tag[] })[];
readonly tags: readonly Tag[];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would put this optional

Suggested change
readonly tags: readonly Tag[];
readonly tags?: readonly Tag[] | null;

return (
selectedTag === 0 ||
useCase.tags?.some((tag) => tag.name === updatedTags[selectedTag].name)
item.tags?.some((tag) => tag.name === updatedTags[selectedTag].name)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should already handle the null tags scenario

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants