Skip to content

TEBEX-1314 Payment portal support#31

Merged
Chilledson merged 17 commits intotebexio:mainfrom
tebexjaames:TEBEX-1314-payment-portal
Feb 5, 2026
Merged

TEBEX-1314 Payment portal support#31
Chilledson merged 17 commits intotebexio:mainfrom
tebexjaames:TEBEX-1314-payment-portal

Conversation

@tebexjaames
Copy link
Contributor

No description provided.

@Chilledson Chilledson requested a review from Copilot January 14, 2026 10:15
Copy link

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 adds payment portal support to Tebex.js, introducing a new portal API alongside the existing checkout functionality. The implementation shares common code between checkout and portal, including theme definitions, color configurations, and lightbox components.

Changes:

  • Introduced Tebex.portal API with initialization, launch, render, and close methods
  • Refactored shared types and components (theme, colors, lightbox) into common modules
  • Added comprehensive test coverage for portal functionality

Reviewed changes

Copilot reviewed 26 out of 47 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/portal.ts New portal implementation with initialization, rendering, and event handling
src/common.ts Extracted shared theme and color types used by both checkout and portal
src/components/lightbox.tsx Refactored lightbox component with enhanced options support and name-based identification
src/components/spinner.tsx Updated import paths to reflect new components directory structure
src/checkout.ts Updated to use shared types and refactored lightbox integration
src/index.ts Exported new portal API and shared types
src/legacy/checkoutTypes.ts Added deprecated type aliases for backward compatibility
src/webComponents/TebexPortal.ts Created stub web component (not yet fully implemented)
src/utils/dom.ts Enhanced setAttribute to support array values
tests/portal.test.ts Comprehensive test suite for portal functionality
tests/checkout.test.ts Updated tests to support object-based color configuration
example/index.html Added portal demo section to example page

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

src/common.ts Outdated
};

/**
*
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

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

Empty JSDoc comment block for TebexColorConfig type. Should include a description explaining that this type accepts either an array of color definitions or an object mapping color names to color values.

Suggested change
*
* Configuration for theming colors in the embedded Tebex UI.
*
* Accepts either:
* - an array of {@link TebexColorDefinition} objects, or
* - an object mapping {@link TebexColorName} keys to string color values.

Copilot uses AI. Check for mistakes.
@Chilledson
Copy link
Contributor

@tebexjaames looks like some tests are failing?

@tebexjaames
Copy link
Contributor Author

@tebexjaames looks like some tests are failing?

Yeah; they're expecting portal.tebex.io to exist at the moment. ":)

@Chilledson Chilledson merged commit f1763fc into tebexio:main Feb 5, 2026
1 check passed
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