Skip to content

ADSDEV-2714: dotcom UI header search ad slot anchor#1206

Merged
apaleslimghost merged 8 commits intomainfrom
ADSDEV-2714-dotcom-ui-header-search-ad-slot-anchor
Mar 18, 2026
Merged

ADSDEV-2714: dotcom UI header search ad slot anchor#1206
apaleslimghost merged 8 commits intomainfrom
ADSDEV-2714-dotcom-ui-header-search-ad-slot-anchor

Conversation

@sami-ft
Copy link
Copy Markdown

@sami-ft sami-ft commented Mar 12, 2026

Context

We’ve sold an ad space at the right side of the search widget on ft.com and we need a stable right-side slot in dotcom-ui-header search for external widgets/ads

JIRA
Figma

Solution

Implement an anchor / right column where widgets can be inserted

Changes

  • new selector available for external: [data-o-header-search-widget-anchor="primary"] and [data-o-header-search-widget-anchor="sticky"]
  • The grid layout starts at oGrid size L where there's enough space to add content
  • The anchor clips horizontally to prevent scrolling
  • Since nesting has changed, update browser.js init to resolve the required containers via .closest()

Manual QA

  • Core experience (js disabled): No visual changes
  • Typeahead search: No visual / behaviour changes

Tests

  • Regression unit tests for adding the anchor

Run locally (next-home-page)

cd /your/path/to/dotcom-page-kit
npm run build --workspace=packages/dotcom-ui-header

cd /your/path/to/dotcom-page-kit/packages/dotcom-ui-header
volta run --node 22 npm link

cd /your/path/to/next-home-page
volta run --node 22 npm link @financial-times/dotcom-ui-header
volta run --node 22 npm start

Then verify on local home page:

  • anchor exists in primary/sticky search
  • centered search + typeahead stay aligned with tall/wide creatives

Screenshots

Grid layout
Screenshot 2026-03-12 at 08 35 31

Grid layout sticky
Screenshot 2026-03-12 at 08 36 38

Anchor flows with the content, empty or not
Screenshot 2026-03-12 at 08 37 14

Anchor behaviour if the inside element is too big
Screenshot 2026-03-12 at 08 38 55

Not displayed on small screens
Screenshot 2026-03-12 at 08 40 24

The sold ad position will have these dimensions and locations and handles its own available space within the anchor via container queries

Enough space for anchor, not for the ad
Screenshot 2026-03-12 at 08 42 15

Enough space for the ad
Screenshot 2026-03-12 at 08 42 50

@sami-ft sami-ft requested a review from a team as a code owner March 12, 2026 08:43
// Grid layout on large sizes to create right hand rail for widget anchor
@include oGridRespondTo('L') {
.o-header__search .o-header__container {
max-width: none;
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Revert the max width set in o-header here, in order to let the grid we full width

Image

@apaleslimghost apaleslimghost merged commit 5ec614c into main Mar 18, 2026
14 checks passed
@apaleslimghost apaleslimghost deleted the ADSDEV-2714-dotcom-ui-header-search-ad-slot-anchor branch March 18, 2026 10:35
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