Skip to content

Varkopat/enhancement/664 update newscard component layout based on new figma designs - #676

Open
Varkopat wants to merge 25 commits into
devfrom
Varkopat/enhancement/664-update-newscard-component-layout-based-on-new-figma-designs
Open

Varkopat/enhancement/664 update newscard component layout based on new figma designs#676
Varkopat wants to merge 25 commits into
devfrom
Varkopat/enhancement/664-update-newscard-component-layout-based-on-new-figma-designs

Conversation

@Varkopat

@Varkopat Varkopat commented Aug 21, 2026

Copy link
Copy Markdown

📄 Pull Request Overview

Closes #664

🔧 Changes Made

1. Responsive Layout:

  • Implemented a mobile-first responsive approach: stacked the content vertically on small screens and switched to the horizontal (image-left, text-right) layout on larger viewports.

  • Updated NewsCard widths across breakpoints to follow responsive design specs.

  • Fixed content width calculations on medium/tablet screens.

  • Configured mobile cards to render full-width within their container with proper image sizing.

2. Spacing & Styling Adjustments:

  • Adjusted desktop card widths and gap values according to the new Figma spec.

  • Reduced mobile title margin-bottom from 20px to 8px to align closer to the navigation bar.

  • Refined overall layout, gap, and spacing rules across NewsCard and NewsPage.


Checklist Before Submission

  • Functionality: I have tested my code, and it works as expected.
  • JSDoc: I have added or updated JSDoc comments for all relevant code.
  • Debugging: No console.log() or other debugging statements are left.
  • Clean Code: Removed commented-out or unnecessary code.
  • Tests: Added new tests or updated existing ones for the changes made.
  • Documentation: Documentation has been updated (if applicable).

📝 Additional Information

  • Screenshot:
screenshot

Varkopat added 17 commits August 1, 2026 01:49
- refactored layout to support image-left/horizontal on larger screens

- added publisher? and description? support

- preserved existing previewText fallback

- switched to a more semantic <article> structure

- Updated NewsCard.module.scss

-implemented responsive card layout
stacked vertically on small screens

- switched to horizontal image-left layout at breakpoint(md)

- improved spacing, typography, and metadata styling

Validation:
No TypeScript or style diagnostics remain in NewsCard.tsx and NewsCard.module.scss
…e title sits closer to the navbar

2. Desktop grid width: Increased from 716px to 900px for a wider newscard layout on desktop
…desktop I fixed NewsCard's width to use correct value and on mobile I fixed width and gap values.
@codecov-alt

codecov-alt Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
...ration/src/preparedPages/NewsPages/ui/NewsPage.tsx 98.38% <100.00%> (+98.38%) ⬆️
...ext-migration/src/widgets/NewsCard/ui/NewsCard.tsx 100.00% <100.00%> (+100.00%) ⬆️

... and 9 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Varkopat Varkopat linked an issue Aug 21, 2026 that may be closed by this pull request
@Varkopat
Varkopat marked this pull request as draft August 24, 2026 11:42
@Varkopat
Varkopat marked this pull request as ready for review August 25, 2026 16:13

@Skoivumaki Skoivumaki left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good work as always. Just fix following small issues:
Fix issue with PageTitle.
The gap between image and text in NewsCard seems too large to me. Check expected distance in Figma and keep padding or other affecting elements in mind.

Comment thread frontend-next-migration/src/preparedPages/NewsPages/ui/NewsPage.tsx Outdated
@Varkopat
Varkopat requested a review from Skoivumaki September 2, 2026 12:20
@Varkopat
Varkopat marked this pull request as draft September 3, 2026 17:55
@Varkopat
Varkopat marked this pull request as ready for review September 4, 2026 14:03

@Skoivumaki Skoivumaki left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

More stuff/almost there:

  • The image should have more width than height (see Figma example, its almost same as mobile):
Image
  • If news item doesn't have an image, make sure frontend assigns one as a fallback. (Directus doesn't allow this to happen, but it still has)

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.

Update NewsCard component layout based on new Figma designs

2 participants