Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]`
Expand All @@ -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`)
Expand Down
23 changes: 23 additions & 0 deletions assets/css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 */
Expand Down
36 changes: 30 additions & 6 deletions assets/js/src/components/admin/Settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -427,12 +440,23 @@ const Settings = () => {
<div className="mayo-external-source-info">
<strong>{source.name || source.url}</strong>
<div className="mayo-external-source-details">
<span className="mayo-source-id">ID: {source.id}</span>
<span>Type: {source.event_type || 'All'}</span>
{source.service_body && <span>Service Body: {source.service_body}</span>}
<span className={`mayo-source-status ${source.enabled ? 'enabled' : 'disabled'}`}>
{source.enabled ? 'Enabled' : 'Disabled'}
</span>
<div className="mayo-source-id-row">
<code className="mayo-source-id">{source.id}</code>
<button
className="mayo-copy-id"
onClick={() => handleCopyId(source.id)}
title="Copy ID"
>
Copy ID to clipboard
</button>
</div>
<div className="mayo-source-meta">
<span>Type: {source.event_type || 'All'}</span>
{source.service_body && <span>Service Body: {source.service_body}</span>}
<span className={`mayo-source-status ${source.enabled ? 'enabled' : 'disabled'}`}>
{source.enabled ? 'Enabled' : 'Disabled'}
</span>
</div>
</div>
</div>
<div className="mayo-external-source-actions">
Expand Down
2 changes: 2 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down