Skip to content

WS-2501 - Prepare topic discovery for rollout#14165

Merged
LilyL0u merged 27 commits into
latestfrom
prepare-topic-discovery-for-rollout
Jul 2, 2026
Merged

WS-2501 - Prepare topic discovery for rollout#14165
LilyL0u merged 27 commits into
latestfrom
prepare-topic-discovery-for-rollout

Conversation

@LilyL0u

@LilyL0u LilyL0u commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

This pull request enhances the TopicDiscovery component with improved support for right-to-left (RTL) languages, adds arabic story to storybook so it can be tested. It introduces new test fixtures and Storybook stories for Arabic topics, ensures correct RTL rendering, and removes unused experiment-related code for both click and view tracking. The changes also include minor styling and prop cleanup.

RTL and Arabic Support Enhancements:

  • Added Arabic topic fixtures and multiple-topic data to fixtures.ts, enabling comprehensive testing and story coverage for RTL languages.
  • Updated Storybook stories (index.stories.tsx) to include scenarios for Arabic topics and RTL rendering, using new fixtures and a fetch mock decorator.
  • Expanded tests in index.test.tsx to verify correct RTL rendering, topic switching, and text direction for Arabic topics. [1] [2]

Component and Prop Simplification:

  • Removed unused experimentProps from TopicDiscovery and related components, cleaning up the props and internal logic. [1] [2] [3] [4] [5] [6]
  • Ensured the dir attribute is set on the main section element based on the current service's direction (LTR or RTL), improving accessibility and layout for RTL languages.

Event Tracking Cleanup:

  • Removed all topic discovery–related experiment tracking logic from both click (useClickTrackerHandler) and view (useViewTracker) hooks, as these experiments are no longer active. [1] [2] [3] [4]

Styling Adjustments:

  • Simplified the moreAboutLink style by removing unnecessary padding, making the styling more consistent.

Miscellaneous:

Also adds the topic discovery component to the media article page with the same toggle and same conditional logic.

I sent @eagerterrier a file to upload to enable the toggles on test, as the interface is currently not working properly.

Some screenshots:

Screenshot 2026-06-29 at 16 39 56 Screenshot 2026-06-29 at 15 15 31 Screenshot 2026-06-29 at 15 12 46

Summary

A very high-level summary of easily-reproducible changes that can be understood by non-devs, and why these changes where made.

Code changes

  • List key code changes that have been made.

Testing

  1. List the steps required to test this PR.

Useful Links

@LilyL0u LilyL0u changed the base branch from latest to WS-2854-translations-for-topic-discovery-component June 29, 2026 13:53
Base automatically changed from WS-2854-translations-for-topic-discovery-component to latest June 30, 2026 13:13
@LilyL0u LilyL0u marked this pull request as ready for review June 30, 2026 14:25
@LilyL0u LilyL0u changed the title Prepare topic discovery for rollout WS-2501 - Prepare topic discovery for rollout Jun 30, 2026
Comment thread src/app/components/TopicDiscovery/index.test.tsx Outdated
Comment thread src/app/pages/MediaArticlePage/index.test.tsx Outdated
@LilyL0u LilyL0u merged commit 8240f8a into latest Jul 2, 2026
14 checks passed
@LilyL0u LilyL0u deleted the prepare-topic-discovery-for-rollout branch July 2, 2026 11:27
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.

3 participants