Skip to content

Conversation

@ibrahimcesar
Copy link
Owner

Summary

Fixed Issues:

  • ✅ Playlist icon not visible on mobile - Added a visual playlist icon overlay (.lty-playlist-icon) that shows in the top-right corner when playlist={true}
  • ✅ "Watch" text visible in play button - Added CSS properties (padding: 0, line-height: 0, font-size: 0) to completely hide the text while keeping it accessible to screen readers

Changes Made:

  • src/lib/LiteYouTubeEmbed.css - Added playlist icon CSS and button text hiding
    src/lib/index.tsx
  • Added playlist icon div that renders when playlist={true} and iframe is not loaded
  • .gitignore - Added *.backup pattern to ignore backup files

Fixes #222

ibrahimcesar and others added 5 commits November 20, 2025 11:13
Fixes two visual issues:

1. **Playlist icon not visible on mobile**
   - Added `.lty-playlist-icon` CSS class with layered rectangles SVG
   - Icon appears in top-right corner when `playlist={true}`
   - Uses dark background with white icon for contrast
   - Only shows before iframe is activated
   - z-index: 1 to appear above thumbnail but below play button

2. **"Watch" text visible in play button**
   - Added `padding: 0`, `line-height: 0`, and `font-size: 0` to `.lty-playbtn`
   - Ensures button only shows the SVG background, not the text
   - Text remains in DOM for screen readers via `.lty-visually-hidden`

The playlist icon design uses overlapping rectangles to indicate
multiple videos, similar to YouTube's native playlist indicator.
This provides visual feedback on both mobile and desktop that the
embed is a playlist, not a single video.

Closes #222

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Fixed dependency version mismatch between vitest and @vitest/coverage-v8
that was causing CI builds to fail with ERESOLVE error.

Changed:
- @vitest/coverage-v8: ^4.0.10 → ^3.2.4 (to match vitest@^3.2.4)

The coverage package v4.x requires vitest@4.x, but we're using vitest@3.2.4.
Downgrading coverage package to matching v3.2.4 resolves the peer dependency
conflict.

All tests passing (51/51) ✅

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…ackage

Fixed warning: "The CommonJS 'exports' variable is treated as a global
variable in an ECMAScript module and may not work as expected"

Changes:
- Renamed CommonJS output from `index.js` to `index.cjs`
- Updated package.json `main` field: `dist/index.js` → `dist/index.cjs`
- Updated package.json `exports.require` path to use `.cjs`
- Updated vite.config.ts to output `.cjs` for CommonJS format
- Updated size-limit config to reference new filename

Node's package format requires that CommonJS files use the `.cjs`
extension when package.json has `"type": "module"`. This resolves
the build warning while maintaining full backward compatibility.

Tests: ✅ 51/51 passing
Size limits: ✅ All passing
  - ES Module: 3.15 kB (limit: 10 kB)
  - CommonJS: 3.16 kB (limit: 10 kB)
  - CSS: 1.25 kB (limit: 2 kB)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions
Copy link
Contributor

github-actions bot commented Nov 20, 2025

size-limit report 📦

Path Size
ES Module 3.08 KB (+0.87% 🔺)
CommonJS 3.08 KB (+2.14% 🔺)
CSS 1.22 KB (+16.22% 🔺)

@ibrahimcesar ibrahimcesar merged commit d77977b into main Nov 20, 2025
8 checks 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.

Cannot see the Playlist Icon on Mobile

2 participants