Skip to content

v1.58.6.0 feat: add Zalando size chart parser to extension#2191

Open
hammadbhagat11-ctrl wants to merge 3 commits into
garrytan:mainfrom
hammadbhagat11-ctrl:feat/zalando-size-parser
Open

v1.58.6.0 feat: add Zalando size chart parser to extension#2191
hammadbhagat11-ctrl wants to merge 3 commits into
garrytan:mainfrom
hammadbhagat11-ctrl:feat/zalando-size-parser

Conversation

@hammadbhagat11-ctrl

Copy link
Copy Markdown

Summary

  • Adds extension/zalando-parser.js: dedicated content script for Zalando product pages that reads size charts using only stable data-testid attributes (CSS class names are build-time hashed and change on every deploy)
  • Two-step parsing: looks for a size table already in the DOM, then clicks the Size Guide link and waits 700ms for the React modal to render if not found
  • Extracts available sizes from the size picker independently of the chart
  • Covers all 16 European Zalando TLDs (.de, .co.uk, .fr, .it, .es, .nl, .be, .pl, .se, .fi, .dk, .no, .ch, .at, .ie, .pt)
  • Adds parseZalandoSizeChart to the ALLOWED_TYPES security allowlist in background.js with a routing handler

Test plan

  • Load the extension in Chrome (chrome://extensions, Developer mode, Load unpacked, select extension/)
  • Navigate to any Zalando product page
  • Send {type: 'parseZalandoSizeChart'} from the extension sidebar and verify structured size chart returned
  • Test on a product with no size guide and verify graceful error with available sizes listed
  • bun test passes

Generated with Claude Code

hiba0016 and others added 3 commits July 7, 2026 11:48
Adds extension/zalando-parser.js — a dedicated content script for
reading size charts on Zalando product pages. Uses only data-testid
attributes (CSS classes are build-time hashed on Zalando and change
every deploy). Two-step approach: check DOM first, click the Size
Guide link if not found, wait 700ms for React modal, then parse.

Wires manifest.json with a Zalando-only content_scripts entry (all
16 country TLDs) and adds the parseZalandoSizeChart message type to
background.js ALLOWED_TYPES with a routing handler.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Require 2-of-4 size-signal matches in the regex fallback to reduce
false positives. Add CHANGELOG entry and VERSION bump.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@trunk-io

trunk-io Bot commented Jul 7, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@github-actions github-actions Bot changed the title feat: add Zalando size chart parser to extension v1.58.6.0 feat: add Zalando size chart parser to extension Jul 7, 2026
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