From 61821a43353b8642af7318d4327581db9d777e04 Mon Sep 17 00:00:00 2001 From: Danny Gershman Date: Sun, 22 Mar 2026 13:19:49 -0400 Subject: [PATCH 1/2] copy button for source ids --- assets/css/admin.css | 23 ++++++++++++++ assets/js/src/components/admin/Settings.js | 36 ++++++++++++++++++---- 2 files changed, 53 insertions(+), 6 deletions(-) diff --git a/assets/css/admin.css b/assets/css/admin.css index 10df1bf..86bbcff 100644 --- a/assets/css/admin.css +++ b/assets/css/admin.css @@ -428,6 +428,13 @@ margin-top: 20px !important; } +.mayo-source-id-row { + display: inline-flex; + align-items: center; + gap: 8px; + margin-bottom: 8px; +} + .mayo-source-id { font-family: monospace; color: #2271b1; @@ -436,6 +443,22 @@ padding: 4px 8px; border-radius: 3px; border: 1px solid #c5d9ed; + user-select: all; +} + +.mayo-copy-id { + display: inline-flex; + align-items: center; + padding: 2px 4px; + background: none; + border: 1px solid #c5d9ed; + border-radius: 3px; + cursor: pointer; + color: #2271b1; +} + +.mayo-copy-id:hover { + background: #f0f7fc; } /* Recurring Indicator Styles */ diff --git a/assets/js/src/components/admin/Settings.js b/assets/js/src/components/admin/Settings.js index 2118c5e..3d2c483 100644 --- a/assets/js/src/components/admin/Settings.js +++ b/assets/js/src/components/admin/Settings.js @@ -236,6 +236,19 @@ const Settings = () => { } }; + const handleCopyId = async (id) => { + try { + await navigator.clipboard.writeText(id); + } catch (err) { + const textArea = document.createElement('textarea'); + textArea.value = id; + document.body.appendChild(textArea); + textArea.select(); + try { document.execCommand('copy'); } catch (e) {} + document.body.removeChild(textArea); + } + }; + const handleDeleteSource = async (index) => { if (!confirm('Are you sure you want to delete this external source?')) return; @@ -427,12 +440,23 @@ const Settings = () => {
{source.name || source.url}
- ID: {source.id} - Type: {source.event_type || 'All'} - {source.service_body && Service Body: {source.service_body}} - - {source.enabled ? 'Enabled' : 'Disabled'} - +
+ {source.id} + +
+
+ Type: {source.event_type || 'All'} + {source.service_body && Service Body: {source.service_body}} + + {source.enabled ? 'Enabled' : 'Disabled'} + +
From 310865a31a6684e0709c52e20634be395737cba9 Mon Sep 17 00:00:00 2001 From: Danny Gershman Date: Sun, 22 Mar 2026 13:21:53 -0400 Subject: [PATCH 2/2] release note update --- CLAUDE.md | 10 +++------- readme.txt | 2 ++ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index c0ffc77..35e0735 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -100,12 +100,8 @@ Update the changelog whenever you: - Update dependencies or requirements ### How to Update -1. **Add a new version section** at the top of the changelog (after `== Changelog ==`) -2. **Increment version number** appropriately: - - Patch (X.X.1): Bug fixes, minor improvements - - Minor (X.1.0): New features, non-breaking changes - - Major (1.X.0): Breaking changes, major rewrites -3. **Write clear, user-focused descriptions**: +1. **Add entries to the current (unreleased) version section** at the top of the changelog. Do NOT create a new version section or bump version numbers unless explicitly asked — versions are only bumped at release time. +2. **Write clear, user-focused descriptions**: - Start with action words (Fixed, Added, Improved, etc.) - Describe the user impact, not technical details - Reference GitHub issue numbers when applicable: `[#123]` @@ -122,7 +118,7 @@ Update the changelog whenever you: ``` ### Version Consistency -Also update the version number in: +Only bump version numbers when explicitly asked to cut a release. When bumping, update in: - `mayo-events-manager.php` (line 23: `MAYO_VERSION` constant) - `readme.txt` (line 8: `Stable tag`) - `package.json` (line 3: `version`) diff --git a/readme.txt b/readme.txt index 84136a2..bf1ec6a 100644 --- a/readme.txt +++ b/readme.txt @@ -188,6 +188,8 @@ This project is licensed under the GPL v2 or later. == Changelog == = 1.8.8 = +* Added copy-to-clipboard button for external source IDs in Settings, making IDs easier to select and copy. [#254] +* Improved external source layout with ID displayed in a distinct box on its own row. * Added diagnostic timing instrumentation to the events API for debugging slow external source requests. Append `&debug=1` to see per-call timing breakdown. * Improved performance of external source fetching by parallelizing HTTP requests. Sites with multiple external sources will see significantly faster load times. * Changed external source event type dropdown from "Select an event type" to "All Event Types" to clarify that leaving it blank fetches all types.