Skip to content

WS-2627: My News page front end improvements#14080

Open
elvinasv wants to merge 10 commits into
latestfrom
WS-2627-my-news-page-front-end-improvements
Open

WS-2627: My News page front end improvements#14080
elvinasv wants to merge 10 commits into
latestfrom
WS-2627-my-news-page-front-end-improvements

Conversation

@elvinasv
Copy link
Copy Markdown
Member

@elvinasv elvinasv commented May 29, 2026

JIRA: https://bbc.atlassian.net/browse/WS-2627

Summary

Screenshot 2026-06-02 at 17 50 25 Screenshot 2026-06-02 at 17 52 43

Code changes

  • Extracted AccountActionButtons from Account Promotional banner for reusability
  • Updated UX to match the Figma design

Testing

  1. Use x-id-oidc-signedin: 1 | 0 (sign-in/sign-out states) as a Request Header
  2. Local dev: http://localhost.bbc.com:7081/hindi/my-news

Useful Links

Copy link
Copy Markdown
Member Author

@elvinasv elvinasv Jun 1, 2026

Choose a reason for hiding this comment

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

Note: Extracted for reusability from AccountPromotionalBanner - no new changes

removing: 'Removing',
},
myNews: {
title: 'My News',
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Note: not a final copy

@elvinasv elvinasv self-assigned this Jun 2, 2026
@elvinasv elvinasv marked this pull request as ready for review June 2, 2026 15:15
@eagerterrier eagerterrier requested a review from Copilot June 2, 2026 16:19
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

This PR improves the WS Next.js “My News” page UI to better match design, adds translated copy for Hindi, introduces a reusable spinner component, and extracts reusable account sign-in/register action buttons from the account promotional banner for reuse on the My News guest state.

Changes:

  • Refactors My News page layout/styling (new styles location, updated headings/spacing, increased items-per-page to 24).
  • Reworks My News loading + guest states (spinner-based loading UI, guest CTA buttons) and updates tests accordingly.
  • Extracts AccountActionButtons for reuse, and introduces a shared Spinner component (also adopted by SaveButton).

Reviewed changes

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

Show a summary per file
File Description
ws-nextjs-app/pages/[service]/my-news/styles.ts Removes old shared My News styles file (styles moved into MyNewsPage subfolder).
ws-nextjs-app/pages/[service]/my-news/MyNewsPage/styles.ts Adds updated My News page styles (heading/subheading spacing + spinner sizing/wrapping).
ws-nextjs-app/pages/[service]/my-news/MyNewsPage/MyNewsPageLoading.tsx Updates loading state to use a spinner and translated page title.
ws-nextjs-app/pages/[service]/my-news/MyNewsPage/MyNewsPageGuest/styles.ts Adds guest-state layout styles (heading + CTA button container).
ws-nextjs-app/pages/[service]/my-news/MyNewsPage/MyNewsPageGuest/index.tsx Introduces guest-state component using translations + AccountActionButtons.
ws-nextjs-app/pages/[service]/my-news/MyNewsPage/MyNewsPageGuest.tsx Removes legacy placeholder guest component.
ws-nextjs-app/pages/[service]/my-news/MyNewsPage/MyNewsPageContent.tsx Uses translations for metadata/title/error/empty states; increases items-per-page; adds a subheading before saved-articles grid.
ws-nextjs-app/pages/[service]/my-news/MyNewsPage/index.tsx Uses translations for metadata title and guards rendering; updates styles import path.
ws-nextjs-app/pages/[service]/my-news/MyNewsPage/index.test.tsx Updates tests for spinner loading UI, items-per-page change, and guest CTA rendering.
src/app/models/types/translations.ts Adds myNews translations shape to the Translations type.
src/app/lib/config/services/hindi.ts Adds Hindi service config myNews translation strings.
src/app/components/Spinner/index.tsx Adds new reusable Spinner component.
src/app/components/Spinner/index.styles.ts Adds spinner keyframes + animation styling.
src/app/components/SaveButton/index.tsx Switches SaveButton to use the new shared Spinner component.
src/app/components/SaveButton/index.styles.ts Removes SaveButton-specific spinner animation styles now covered by shared spinner.
src/app/components/PromotionalBanner/index.styles.ts Removes redundant justifyContent: 'flex-start' in banner actions container.
src/app/components/Account/AccountPromotionalBanner/index.tsx Replaces inline CTA link markup with extracted AccountActionButtons.
src/app/components/Account/AccountPromotionalBanner/index.styles.tsx Removes CTA/button styling now owned by AccountActionButtons.
src/app/components/Account/AccountActionButtons/index.tsx Adds reusable sign-in/register CTA component (used by promo banner + My News guest state).
src/app/components/Account/AccountActionButtons/index.styles.tsx Adds styling for the extracted account CTA buttons, including light-background variants.

Comment thread ws-nextjs-app/pages/[service]/my-news/MyNewsPage/index.test.tsx Outdated
Comment thread src/app/components/Account/AccountActionButtons/index.tsx
Comment thread src/app/components/Account/AccountActionButtons/index.tsx
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.

4 participants