Skip to content

Conversation

davidornelas11
Copy link
Contributor

@davidornelas11 davidornelas11 commented Sep 24, 2025

Tags are hidden by default on conponent-news cards.
Tags already do not appear on the news carousel by default so no change was needed there

Description

Checklist

  • Tests pass for relevant code changes

Important Reminders

Links

Tags are hidden by default on conponent-news cards
@davidornelas11 davidornelas11 requested a review from a team as a code owner September 24, 2025 20:15
@asu-jenkins-devops
Copy link
Collaborator

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a hideTags prop to the component-news package that allows hiding tags on news cards, with tags hidden by default. The change standardizes the behavior across different news display formats by making tags optional and providing consistent control over their visibility.

  • Added hideTags prop with default value of true to hide tags by default
  • Updated prop types to accept both boolean and string values for the hideTags prop
  • Modified rendering logic to conditionally display tags based on the hideTags prop value

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
packages/component-news/src/core/types/news-types.js Added TypeScript definition for the new hideTags prop
packages/component-news/src/components/CardListlNews/index.jsx Implemented hideTags functionality in list view with prop validation
packages/component-news/src/components/CardGridNews/index.jsx Implemented hideTags functionality in grid view
packages/component-news/src/components/CardCarouselNews/index.jsx Removed unnecessary blank line

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

* @param {FeedType} props
*/
const CardGridNews = ({ cardButton, ...props }) => {
const CardGridNews = ({ cardButton, hideTags = true, ...props }) => {
Copy link

Copilot AI Sep 29, 2025

Choose a reason for hiding this comment

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

Missing PropTypes validation for the hideTags prop. Should include the same validation as CardListlNews: hideTags: PropTypes.oneOf([\"true\", \"false\", true, false])

Copilot uses AI. Check for mistakes.

/**
*
* @param {Object} feed
* @param {import("../../core/types/news-types").CardButton} cardButton
Copy link

Copilot AI Sep 29, 2025

Choose a reason for hiding this comment

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

Missing JSDoc parameter documentation for the new hideTags parameter. Should add @param {boolean} hideTags to match the pattern used in CardListlNews.

Suggested change
* @param {import("../../core/types/news-types").CardButton} cardButton
* @param {import("../../core/types/news-types").CardButton} cardButton
* @param {boolean} hideTags

Copilot uses AI. Check for mistakes.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants