Skip to content

Commit c9d9b65

Browse files
committed
Implement proper webComponent pattern for Lit web components in Social/Highlighter, update tests
1 parent 24dc16d commit c9d9b65

13 files changed

Lines changed: 755 additions & 904 deletions

File tree

‎src/components/Social/Highlighter/README.md‎

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -65,35 +65,3 @@ Platforms supported (in priority order):
6565
2. LinkedIn
6666
3. Bluesky
6767
4. Reddit
68-
69-
## Architecture
70-
71-
- `client.ts` - Web Component with HighlighterElement class and Highlighter LoadableScript
72-
- `Highlighter.astro` - Astro wrapper component for MDX usage
73-
- `index.ts` - Barrel exports
74-
- `__tests__/client.spec.ts` - Comprehensive unit tests (37 test cases, 100% passing)
75-
76-
## Testing
77-
78-
```bash
79-
npm run test:unit -- src/components/Social/Highlighter/__tests__/client.spec.ts
80-
```
81-
82-
All 37 tests pass, covering:
83-
84-
- LoadableScript interface compliance
85-
- Shadow DOM rendering
86-
- Dialog visibility (hover, focus, keyboard)
87-
- Platform sharing with URL encoding
88-
- Copy to clipboard
89-
- Native Share API
90-
- Custom event emission
91-
- Accessibility attributes
92-
- Edge cases
93-
94-
## Browser Support
95-
96-
- Modern browsers with Web Components support
97-
- Native Share API for mobile (iOS Safari, Android Chrome)
98-
- Platform-specific intents as fallback for desktop
99-
- Copy API with clipboard permissions

0 commit comments

Comments
 (0)