Skip to content
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

feat: Enhance UI to display all user stories #97

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

joshua-jinu
Copy link

Refactor User Stories Section into Reusable Component

Summary

Enhanced the Jenkins User Stories section by extracting the story card markup into a separate reusable component (UserStoryCard). This improves code maintainability and reusability while preserving all existing functionality.

Changes

  • Created new component UserStoryCard to encapsulate the user story display logic
  • Created associated stylesheet UserStoryCard.module.js for component-specific styles
  • Replaced inline story card markup in main component with the new UserStoryCard component
  • Maintained all existing functionality including:
    • Image display with Gatsby Image
    • Story title and metadata display
    • Link handling
    • Responsive layout

Before:

Desktop:
image
Mobile:
image

After:

Desktop:
image
Mobile:
image

Implementation Details

New Files:

  • UserStoryCard.js: Component that renders individual user story cards
  • UserStoryCard.module.js: Component-specific styles

Props Passed to UserStoryCard:

  • slug: Story URL identifier
  • image: Story featured image
  • title: Story title
  • date: Publication date
  • tag_line: Story summary/tagline

Testing Completed

  • Verified all links work correctly and navigate to appropriate story pages
  • Tested responsive layout across different screen sizes
  • Confirmed images load and display properly
  • Verified date and tagline display correctly
  • Tested with and without images to ensure graceful handling
  • Verified component styling matches original design

@joshua-jinu
Copy link
Author

Hey @krisstern , could you please have a look at this PR

@krisstern
Copy link
Member

Sure @joshua-jinu thanks for the PR! And I will take a look shortly.

@krisstern krisstern changed the title Enhanced UI to display all user stories feat: Enhance UI to display all user stories Feb 6, 2025
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