Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a56fd7aff7 |
@@ -9,6 +9,19 @@ Format: [Keep a Changelog 1.1.0](https://keepachangelog.com/en/1.1.0/) — versi
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## [0.3.2] — 2026-05-29 — Play-button glyph baseline fix
|
||||||
|
|
||||||
|
The dashicon used for the play/pause icon was rendering visibly below the button text baseline — the dashicon font sits the glyph low inside its own box, and even with `inline-flex` centering the result looked like the symbol was on a separate row from the word "Play".
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- **Play/pause icon now sits on the text baseline.** Swapped the dashicon (`dashicons-controls-play` / `dashicons-controls-pause`) for a plain Unicode glyph (▶ / ‖) which renders on the text baseline like any other character.
|
||||||
|
- Flex container changed from `align-items: center` to `align-items: baseline` for the same reason.
|
||||||
|
- `font-variant-emoji: text` set so platforms that might otherwise pick up a colour-emoji variant for ▶ keep it as monochrome text.
|
||||||
|
|
||||||
|
**Files changed:** `radio.php` (version), `inc/admin-page.php` + `inc/dashboard-widget.php` (dashicon span → glyph span), `assets/css/radio.css` (drop the dashicon-sizing rule, add `.radio-player__play-glyph` styling, change play-button flex alignment to baseline), `assets/js/radio.js` (`setPlayIcon` now swaps glyph `textContent` instead of dashicon `className`), `inc/about.php` (history entry).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## [0.3.1] — 2026-05-29 — My Radio layout polish + drop dark-auto
|
## [0.3.1] — 2026-05-29 — My Radio layout polish + drop dark-auto
|
||||||
|
|
||||||
Quick patch after a real-screen review of the My Radio admin page. v0.3.0 added a lot of features but stretched the player to fill the full admin width and — embarrassingly — introduced a real contrast bug via the dark-auto CSS.
|
Quick patch after a real-screen review of the My Radio admin page. v0.3.0 added a lot of features but stretched the player to fill the full admin width and — embarrassingly — introduced a real contrast bug via the dark-auto CSS.
|
||||||
|
|||||||
+12
-6
@@ -80,17 +80,23 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.radio-player__play {
|
.radio-player__play {
|
||||||
/* native .button .button-primary styling; just ensure icon aligns */
|
/* native .button .button-primary styling; just ensure glyph aligns */
|
||||||
display: inline-flex !important;
|
display: inline-flex !important;
|
||||||
align-items: center;
|
align-items: baseline;
|
||||||
gap: 6px;
|
gap: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.radio-player__play .dashicons {
|
/* Unicode play/pause glyph (not a dashicon — those sit low inside their
|
||||||
font-size: 14px;
|
own font box and look like they're below the text baseline). A plain
|
||||||
width: 14px;
|
▶ / ‖ glyph renders on the text baseline like any other character. */
|
||||||
height: 14px;
|
.radio-player__play-glyph {
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 11px;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
|
/* Coerce to text rendering rather than colour-emoji on systems that
|
||||||
|
might otherwise pick up an emoji variant for ▶ / ‖. */
|
||||||
|
font-variant-emoji: text;
|
||||||
|
font-family: "Helvetica Neue", Arial, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
.radio-player__volume {
|
.radio-player__volume {
|
||||||
|
|||||||
+5
-3
@@ -68,11 +68,13 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Update play/pause button icon + label to reflect current audio state. */
|
/** Update play/pause button glyph + label to reflect current audio state.
|
||||||
|
* v0.3.2: switched from .dashicons to a Unicode glyph so the symbol sits
|
||||||
|
* on the text baseline instead of below it. */
|
||||||
function setPlayIcon(btn, playing) {
|
function setPlayIcon(btn, playing) {
|
||||||
var icon = btn.querySelector('.dashicons');
|
var glyph = btn.querySelector('[data-radio-play-glyph]');
|
||||||
var label = btn.querySelector('[data-radio-play-label]');
|
var label = btn.querySelector('[data-radio-play-label]');
|
||||||
if (icon) { icon.className = 'dashicons ' + (playing ? 'dashicons-controls-pause' : 'dashicons-controls-play'); }
|
if (glyph) { glyph.textContent = playing ? '‖' : '▶'; } // ‖ or ▶
|
||||||
if (label) { label.textContent = playing ? (cfg.strings.pause || 'Pause') : (cfg.strings.play || 'Play'); }
|
if (label) { label.textContent = playing ? (cfg.strings.pause || 'Pause') : (cfg.strings.play || 'Play'); }
|
||||||
btn.setAttribute('title', playing ? (cfg.strings.pause || 'Pause') : (cfg.strings.play || 'Play'));
|
btn.setAttribute('title', playing ? (cfg.strings.pause || 'Pause') : (cfg.strings.play || 'Play'));
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-1
@@ -48,7 +48,11 @@ function radio_render_about_page() {
|
|||||||
<h2><?php esc_html_e( 'Version history', 'radio' ); ?></h2>
|
<h2><?php esc_html_e( 'Version history', 'radio' ); ?></h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<span class="ver">v0.3.1</span> — 29 May 2026 <span class="latest">latest</span><br>
|
<span class="ver">v0.3.2</span> — 29 May 2026 <span class="latest">latest</span><br>
|
||||||
|
<?php esc_html_e( 'Play-button glyph baseline fix. The dashicon used for play/pause was rendering below the button text. Swapped to a plain Unicode glyph (▶ / ‖) that sits on the text baseline like any other character.', 'radio' ); ?>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<span class="ver">v0.3.1</span> — 29 May 2026<br>
|
||||||
<?php esc_html_e( 'My Radio layout polish + dropped dark-auto. Player no longer stretches edge-to-edge (max-width 880px); volume slider fixed width so the % label sits next to it; station dropdown capped at 360px; play-button icon shrunk to match the button text baseline; intro paragraph now fits one line. Removed the prefers-color-scheme dark-auto behaviour that was unreadable against WordPress\'s still-white postbox; theme=dark is still available as an explicit choice and now gives the player its own dark surface so it actually reads.', 'radio' ); ?>
|
<?php esc_html_e( 'My Radio layout polish + dropped dark-auto. Player no longer stretches edge-to-edge (max-width 880px); volume slider fixed width so the % label sits next to it; station dropdown capped at 360px; play-button icon shrunk to match the button text baseline; intro paragraph now fits one line. Removed the prefers-color-scheme dark-auto behaviour that was unreadable against WordPress\'s still-white postbox; theme=dark is still available as an explicit choice and now gives the player its own dark surface so it actually reads.', 'radio' ); ?>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
|||||||
+1
-1
@@ -50,7 +50,7 @@ function radio_render_main_page() {
|
|||||||
|
|
||||||
<div class="radio-player__controls">
|
<div class="radio-player__controls">
|
||||||
<button type="button" class="button button-primary radio-player__play" data-radio-play>
|
<button type="button" class="button button-primary radio-player__play" data-radio-play>
|
||||||
<span class="dashicons dashicons-controls-play" aria-hidden="true"></span>
|
<span class="radio-player__play-glyph" data-radio-play-glyph aria-hidden="true">▶</span>
|
||||||
<span data-radio-play-label><?php esc_html_e( 'Play', 'radio' ); ?></span>
|
<span data-radio-play-label><?php esc_html_e( 'Play', 'radio' ); ?></span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ function radio_render_dashboard_widget() {
|
|||||||
|
|
||||||
<div class="radio-player__controls">
|
<div class="radio-player__controls">
|
||||||
<button type="button" class="button button-primary radio-player__play" data-radio-play>
|
<button type="button" class="button button-primary radio-player__play" data-radio-play>
|
||||||
<span class="dashicons dashicons-controls-play" aria-hidden="true"></span>
|
<span class="radio-player__play-glyph" data-radio-play-glyph aria-hidden="true">▶</span>
|
||||||
<span data-radio-play-label><?php esc_html_e( 'Play', 'radio' ); ?></span>
|
<span data-radio-play-label><?php esc_html_e( 'Play', 'radio' ); ?></span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
* Plugin Name: Radio
|
* Plugin Name: Radio
|
||||||
* Plugin URI: https://icanhelp.ie/radio
|
* Plugin URI: https://icanhelp.ie/radio
|
||||||
* Description: A small, focused, free radio player for your WordPress admin. 44 SomaFM stations grouped by 10 genres — ambient, electronic, lounge, rock, metal, jazz, world, reggae, holiday, specials. Plays via HTML5 audio; volume + station choice persist per-user.
|
* Description: A small, focused, free radio player for your WordPress admin. 44 SomaFM stations grouped by 10 genres — ambient, electronic, lounge, rock, metal, jazz, world, reggae, holiday, specials. Plays via HTML5 audio; volume + station choice persist per-user.
|
||||||
* Version: 0.3.1
|
* Version: 0.3.2
|
||||||
* Requires at least: 5.0
|
* Requires at least: 5.0
|
||||||
* Requires PHP: 7.4
|
* Requires PHP: 7.4
|
||||||
* Author: David Keane
|
* Author: David Keane
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
if ( ! defined( 'ABSPATH' ) ) { exit; }
|
if ( ! defined( 'ABSPATH' ) ) { exit; }
|
||||||
|
|
||||||
// Plugin coordinates.
|
// Plugin coordinates.
|
||||||
if ( ! defined( 'RADIO_VERSION' ) ) { define( 'RADIO_VERSION', '0.3.1' ); }
|
if ( ! defined( 'RADIO_VERSION' ) ) { define( 'RADIO_VERSION', '0.3.2' ); }
|
||||||
if ( ! defined( 'RADIO_FILE' ) ) { define( 'RADIO_FILE', __FILE__ ); }
|
if ( ! defined( 'RADIO_FILE' ) ) { define( 'RADIO_FILE', __FILE__ ); }
|
||||||
if ( ! defined( 'RADIO_PATH' ) ) { define( 'RADIO_PATH', plugin_dir_path( __FILE__ ) ); }
|
if ( ! defined( 'RADIO_PATH' ) ) { define( 'RADIO_PATH', plugin_dir_path( __FILE__ ) ); }
|
||||||
if ( ! defined( 'RADIO_URL' ) ) { define( 'RADIO_URL', plugin_dir_url( __FILE__ ) ); }
|
if ( ! defined( 'RADIO_URL' ) ) { define( 'RADIO_URL', plugin_dir_url( __FILE__ ) ); }
|
||||||
|
|||||||
Reference in New Issue
Block a user