WEBDEV-8965: Migrate playback-controls into elements - #80
Open
jbuckner wants to merge 2 commits into
Open
Conversation
Move @internetarchive/playback-controls out of the iaux monorepo as ia-playback-controls. Third of seven. - PlaybackMode was a numeric enum, which erasableSyntaxOnly rules out. It's a const object with string values now, so playbackmode="playing" works as an attribute. It never did before: the component declared @Property({ type: PlaybackMode }), which isn't a Lit converter, so the attribute path quietly fell back to String and could only ever have produced a string where the code compared against 0 or 1. - All seven buttons have accessible names now. None of them had one, so a screen reader announced seven unlabelled buttons. - The icons use currentColor instead of hardcoded #fff and #333, so the controls can sit on a light background. The default variable values reproduce the old colours exactly. - Speed and volume clamp to their range as well as wrapping. A value set from outside that isn't on a 0.25 boundary used to overshoot, and with === comparisons it could climb forever without ever hitting the wrap. - .jump-btn:active targets the button rather than an img. The icons are inline SVG, so the old rule matched nothing and the jump buttons had no pressed state at all. The speed button's label deliberately stops at the number rather than saying "1 times". @lit/localize has no plural support, so a unit baked into the string can't be fixed per language. Event names are left alone, mixed kebab-case and camelCase and all, because radio-player listens for them later in this stack. Claude-Session: https://claude.ai/code/session_01U6iNyGicKJywdrWJMTyFin Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
…-migrate-playback-controls * WEBDEV-8964-migrate-waveform-progress: WEBDEV-8972: Run CI on every PR, not just ones based on main (#90)
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## WEBDEV-8964-migrate-waveform-progress #80 +/- ##
=========================================================================
+ Coverage 80.51% 81.04% +0.52%
=========================================================================
Files 31 34 +3
Lines 1047 1092 +45
Branches 245 254 +9
=========================================================================
+ Hits 843 885 +42
- Misses 133 135 +2
- Partials 71 72 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WEBDEV-8965. Stacked on #78, part of WEBDEV-8962.
Beyond the move:
PlaybackModewas a numericenum, whicherasableSyntaxOnlyrules out. It's a const object with string values now, soplaybackmode="playing"works as an attribute. It never did: the component declared@property({ type: PlaybackMode }), which isn't a Lit converter, so the attribute path fell back toStringand could only produce a string where the code compared against0/1.currentColorinstead of hardcoded#fff/#333, so the controls can sit on a light background. The default variable values reproduce the old colours exactly.===comparisons meant it could climb forever without ever hitting the wrap..jump-btn:activetargets the button rather than animg. The icons are inline SVG, so the old rule matched nothing and the jump buttons had no pressed state.The speed button's label stops at the number rather than saying "1 times" —
@lit/localizehas no plural support, so a unit baked into the string can't be corrected per language.Event names are unchanged, mixed kebab-case and camelCase and all, because
radio-playerlistens for them later in this stack.Note: this PR shows only
deploy-previewbecause CI skips PRs not based onmain(WEBDEV-8972). Verified locally:pnpm run build, full suite 248 passing,eslintandprettierclean, 100% coverage on this component.