Skip to content

Item Card UI Update#92

Merged
ntur101 merged 5 commits intoSofteng310:mainfrom
kmck133:feature/feed-icon-spacing
Oct 19, 2025
Merged

Item Card UI Update#92
ntur101 merged 5 commits intoSofteng310:mainfrom
kmck133:feature/feed-icon-spacing

Conversation

@kmck133
Copy link
Copy Markdown
Collaborator

@kmck133 kmck133 commented Oct 19, 2025

📌 Description

Made the item cards in the 'Feed' page a lot bigger to more easily display all of the information needed in the preview of the item. Previously, the card was small, and therefore some of the information such as the location or date it was lost/found would be cut off.
image

Now, it's a lot clearer to see in the previews.

image

🔗 Related Issue(s)

Closes #81


✅ Changes

UI update on the item cards in the feed


🧪 How to Test

Go onto the 'Feed' page and look at the updated cards.

Copilot AI review requested due to automatic review settings October 19, 2025 05:56
Copy link
Copy Markdown
Contributor

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

Expands and restructures the ItemCard UI to present more information clearly in the feed.

  • Moves image to a dedicated header with a loading spinner and adds a full-width location/date row
  • Reworks content area with larger title/description and chip-style status/category/verified tags
  • Updates overall card container styling and interaction states

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


{/* Status and Category Tags - Stick to bottom */}
<div className="flex flex-wrap gap-2 mt-auto">
<span className={`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium border ${getStatusColor(item.kind)}`}>
Copy link

Copilot AI Oct 19, 2025

Choose a reason for hiding this comment

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

getStatusColor(item.kind) will throw if item.kind is undefined or null because getStatusColor calls status.toLowerCase(). Use the already computed statusText (which always falls back to a string) or guard the input, e.g. getStatusColor(statusText) or getStatusColor(item.kind || '').

Suggested change
<span className={`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium border ${getStatusColor(item.kind)}`}>
<span className={`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium border ${getStatusColor(statusText)}`}>

Copilot uses AI. Check for mistakes.
<div className="p-4 flex flex-col flex-grow">
{/* Title */}
<h3 className="font-semibold text-lg text-gray-900 mb-2 line-clamp-1">
{item.title}
Copy link

Copilot AI Oct 19, 2025

Choose a reason for hiding this comment

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

[nitpick] Title no longer has a fallback and may render empty when item.title is missing. Consider restoring the prior fallback for robustness: {item.title || 'Untitled Item'}.

Suggested change
{item.title}
{item.title || 'Untitled Item'}

Copilot uses AI. Check for mistakes.
Comment on lines +97 to +98
<span className="flex-shrink-0">🕒</span>
<span>{formatDate(item.date)}</span>
Copy link

Copilot AI Oct 19, 2025

Choose a reason for hiding this comment

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

[nitpick] Improve semantics and screen reader support by marking the emoji as decorative and wrapping the date with a time element. For example: 🕒 <time dateTime={new Date(item.date).toISOString()}>{formatDate(item.date)}.

Suggested change
<span className="flex-shrink-0">🕒</span>
<span>{formatDate(item.date)}</span>
<span aria-hidden="true" className="flex-shrink-0">🕒</span>
<time dateTime={new Date(item.date).toISOString()}>{formatDate(item.date)}</time>

Copilot uses AI. Check for mistakes.
Comment on lines +115 to +123
<div className="flex flex-wrap gap-2 mt-auto">
<span className={`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium border ${getStatusColor(item.kind)}`}>
{statusText}
</span>
{item.category && (
<span className="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-blue-100 text-blue-700 border border-blue-200">
{item.category}
</span>
)}
Copy link

Copilot AI Oct 19, 2025

Choose a reason for hiding this comment

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

[nitpick] The 'Claimed' badge present in the previous UI has been removed, which drops an important state indicator. If that was unintentional, consider re-adding it in this tag section, e.g.: {item.claimed && (Claimed)}.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator

@ntur101 ntur101 left a comment

Choose a reason for hiding this comment

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

Looks really good, love the spacing and the new layout - although I did notice the claimed tag is not showing up if an item has been set to claimed by the owner of the post, if you could just fix that then it would be perfect :)

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Collaborator

@ntur101 ntur101 left a comment

Choose a reason for hiding this comment

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

Looks good!! love the changes looking good now

@ntur101 ntur101 merged commit 3e4dc31 into Softeng310:main Oct 19, 2025
4 checks passed
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.

[Feature]: Spacing on feed page

3 participants