Skip to content
This repository was archived by the owner on Aug 5, 2026. It is now read-only.

[BpkPriceMarkerButton][BD-11103] Fix price marker onClick event type - #4974

Merged
Ezreal Yang (Supremeyh) merged 2 commits into
mainfrom
codex/bd-11103-fix-price-marker-onclick-type
Jul 29, 2026
Merged

Ezreal Yang (Supremeyh) merged 2 commits into
mainfrom
codex/bd-11103-fix-price-marker-onclick-type

Conversation

@LuoTuxiu

@LuoTuxiu tuxiu.luo (LuoTuxiu) commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Changes

  • Updated BpkPriceMarkerButton's onClick prop from () => void to MouseEventHandler<HTMLButtonElement>, allowing consumers to access the click event.
  • Added coverage showing consumers can stop click propagation with event.stopPropagation().
  • Added a control case showing clicks continue to propagate when stopPropagation() is not called.

Remember to include the following changes:

  • Ensure the PR title includes the name of the component you are changing so it's clear in the release notes for consumers of the changes in the version e.g [Clover-123][BpkButton] Updating the colour
  • README.md (If you have created a new component)
  • Component README.md
  • Tests
  • Accessibility tests
    • The following checks were performed:
      • Ability to navigate using a keyboard only
      • Zoom functionality (Deque University explanation):
        • The page SHOULD be functional AND readable when only the text is magnified to 200% of its initial size
        • Pages must reflow as zoom increases up to 400% so that content continues to be presented in only one column i.e. Content MUST NOT require scrolling in two directions (both vertically and horizontally)
      • Ability to navigate using a screen reader only
  • Storybook examples created/updated
  • For breaking changes or deprecating components/properties, migration guides added to the description of the PR. If the guide has large changes, consider creating a new Markdown page inside the component's docs folder and link it here

Copilot AI review requested due to automatic review settings July 28, 2026 09:45
@skyscanner-backpack-bot

Copy link
Copy Markdown
Contributor

@skyscanner-backpack-bot

skyscanner-backpack-bot Bot commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor
Warnings
⚠️

Package source files (e.g. packages/package-name/src/Component.js) were updated, but snapshots weren't. Have you checked that the tests still pass?

Browser support

If this is a visual change, make sure you've tested it in multiple browsers.

Generated by 🚫 dangerJS against 6c661da

@LuoTuxiu tuxiu.luo (LuoTuxiu) added the patch Patch production bug label Jul 28, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Updates BpkPriceMarkerButton’s onClick prop typing to include the click event and adjusts the related unit test to validate event propagation behavior.

Changes:

  • Type onClick as a MouseEventHandler<HTMLButtonElement> instead of () => void.
  • Update the unit test to assert the click event is received and that propagation can be stopped.

Reviewed changes

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

File Description
packages/backpack-web/src/bpk-component-map/src/BpkPriceMarkerButton.tsx Refines onClick prop typing to a proper React mouse event handler for a <button>.
packages/backpack-web/src/bpk-component-map/src/BpkPriceMarkerButton-test.tsx Reworks the onClick test to check event forwarding and propagation behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@skyscanner-backpack-bot

Copy link
Copy Markdown
Contributor

@Supremeyh Ezreal Yang (Supremeyh) changed the title [BD-11103] Fix price marker onClick event type [bpk-component-map][BD-11103] Fix price marker onClick event type Jul 29, 2026
@Supremeyh
Ezreal Yang (Supremeyh) merged commit 6a86753 into main Jul 29, 2026
15 checks passed
@Supremeyh
Ezreal Yang (Supremeyh) deleted the codex/bd-11103-fix-price-marker-onclick-type branch July 29, 2026 07:48
@Supremeyh Ezreal Yang (Supremeyh) changed the title [bpk-component-map][BD-11103] Fix price marker onClick event type [BpkPriceMarkerButton][BD-11103] Fix price marker onClick event type Jul 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

patch Patch production bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants