Skip to content

feat(components): Add customization support for ZendeskTriggerButton component - #1262

Open
gabrielremote wants to merge 12 commits into
mainfrom
cursor/zendesk-trigger-button-customization-74e8
Open

feat(components): Add customization support for ZendeskTriggerButton component#1262
gabrielremote wants to merge 12 commits into
mainfrom
cursor/zendesk-trigger-button-customization-74e8

Conversation

@gabrielremote

@gabrielremote gabrielremote commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR adds support for customizing the ZendeskTriggerButton component, addressing the issue raised in Linear issue PBYR-4544 where users need to override the trigger button

The request makes sense to make the library entirely headless which is the vision, which addresses technical debt

Linear Issue: PBYR-4544

Open in Web Open in Cursor 

cursoragent and others added 2 commits August 21, 2026 07:12
Add example implementation showing how to customize the Zendesk trigger
button component with custom styling.

Co-authored-by: gabrielremote <gabrielremote@users.noreply.github.com>
- Add ZendeskTriggerButtonComponentProps type
- Add zendeskTriggerButton to Components type
- Update ZendeskTriggerButton to support custom component override
- Add comprehensive tests for custom component usage
- Update documentation with examples and usage guide

This allows consumers to override the trigger button with their own
components, avoiding issues with Tailwind utility classes and enabling
better integration with custom design systems.

Co-authored-by: gabrielremote <gabrielremote@users.noreply.github.com>
@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

📦 Bundle Size Report

Metric Current Previous Change Status
Total (gzip) 257.48 kB 256.05 kB +1.43 kB (+0.6%) 🔴
Total (raw) 689.62 kB 685.61 kB +4 kB (+0.6%) 🔴
CSS (gzip) 21.69 kB 21.69 kB 0 B (0%) 🟢
CSS (raw) 112.77 kB 112.77 kB 0 B (0%) 🟢

Size Limits

  • ✅ Total gzipped: 257.48 kB / 350 kB (73.6%)
  • ✅ Total raw: 689.62 kB / 850 kB (81.1%)
  • ✅ CSS gzipped: 21.69 kB / 25 kB (86.8%)

Largest Files (Top 5)

  1. chunk-AUPAAQUT.js - 14 kB (0 B (0%))
  2. styles.css - 10.85 kB (0 B (0%))
  3. index.css - 10.85 kB (0 B (0%))
  4. index.js - 6.78 kB (+40 B (+0.6%))
  5. chunk-VNMUML3T.js - 6.55 kB (0 B (0%))
View All Files (417 total)
File Size (gzip) Change
chunk-AUPAAQUT.js 14 kB 0 B (0%)
styles.css 10.85 kB 0 B (0%)
index.css 10.85 kB 0 B (0%)
index.js 6.78 kB +40 B (+0.6%)
chunk-VNMUML3T.js 6.55 kB 0 B (0%)
chunk-IUY4BDUY.js 6.43 kB new
chunk-CQVOBIXJ.js 5.65 kB new
chunk-C4HFMTSB.js 5.33 kB 0 B (0%)
chunk-7HGU72GB.js 4.65 kB new
chunk-OUUH3EQY.js 4.22 kB new

✅ Bundle size check passed

@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Deploy preview for adp-cost-calculator ready!

Project:adp-cost-calculator
Status: ✅  Deploy successful!
Preview URL:https://adp-cost-calculator-kdtm6vsh7-remotecom.vercel.app
Latest Commit:068259f

Deployed with vercel-action

@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Deploy preview for remote-flows ready!

Project:remote-flows
Status: ✅  Deploy successful!
Preview URL:https://remote-flows-lk2pm4zzt-remotecom.vercel.app
Latest Commit:068259f

Deployed with vercel-action

Add two new rules to prevent common issues when adding customizable components:

1. component-documentation.mdc - Ensures docs/COMPONENT_CUSTOMIZATION.md
   stays in sync when new components are added
2. component-pattern.mdc - Enforces the Main + Default component pattern
   with lazy loading

These rules address issues found in PR #1262 where documentation updates
and architectural patterns were missed.

Related: PBYR-4544
Follow the established component pattern by separating business logic
from presentation:

- Create ZendeskTriggerButtonDefault.tsx with presentation logic
- Refactor ZendeskTriggerButton.tsx to use component from context
- Add to lazy-default-components.ts for lazy loading
- Add to default-components.ts for tests

This follows the pattern used by all other customizable components
(ForcedValueField, ZendeskDrawer, etc.) where:
- Main component contains business logic and requires component from context
- Default component is pure presentation
- Default is lazy-loaded to reduce bundle size
- Tests use non-lazy default components

Benefits:
- Reduces bundle size for users who customize the component
- Maintains consistency with codebase patterns
- Separates concerns (logic vs presentation)
- Enables proper lazy loading

Related: PBYR-4544
@github-actions

Copy link
Copy Markdown
Contributor

📊 Coverage Report

⚠️ Coverage decreased

Metric Current Previous Change Status
Lines 85.42% 85.44% -0.02% 🔴
Statements 84.98% 85.00% -0.02% 🔴
Functions 83.56% 83.66% -0.10% 🔴
Branches 76.89% 76.89% 0%

Detailed Breakdown

Lines Coverage
  • Covered: 4300 / 5034
  • Coverage: 85.42%
  • Change: -0.02% (9 lines)
Statements Coverage
  • Covered: 4373 / 5146
  • Coverage: 84.98%
  • Change: -0.02% (9 statements)
Functions Coverage
  • Covered: 1144 / 1369
  • Coverage: 83.56%
  • Change: -0.10% (2 functions)
Branches Coverage
  • Covered: 2682 / 3488
  • Coverage: 76.89%
  • Change: 0% (3 branches)

✅ Coverage check passed

gabrielseco added a commit that referenced this pull request Aug 21, 2026
Add two new rules to prevent common issues when adding customizable components:

1. component-documentation.mdc - Ensures docs/COMPONENT_CUSTOMIZATION.md
   stays in sync when new components are added
2. component-pattern.mdc - Enforces the Main + Default component pattern
   with lazy loading

These rules address issues found in PR #1262 where documentation updates
and architectural patterns were missed.

Related: PBYR-4544
@gabrielremote gabrielremote self-assigned this Aug 21, 2026
@gabrielremote gabrielremote changed the title feat: Add customization support for ZendeskTriggerButton component feat(components): Add customization support for ZendeskTriggerButton component Aug 21, 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.

3 participants