Skip to content

Commit 1f78439

Browse files
committed
Refines Webhook Inspector preview header and glow
Changes new-event highlight to orange and updates glow animation for clearer emphasis Introduces a flexible header that aligns title and timestamp, truncates long titles, and lightens timestamp styling Improves readability and prevents overflow without altering logic
1 parent 1157379 commit 1f78439

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

src/components/WebhookInspector.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,18 @@
77
.webhook-events-ul{list-style:none;margin:0;padding:0;overflow:auto;flex:1}
88
.webhook-event-item{padding:10px;border-bottom:1px solid #f0f0f0;cursor:pointer;transition:background 0.2s}
99
.webhook-event-item.selected{background:#f7fbff}
10-
.webhook-event-item.new-event{animation:eventGlow 0.5s ease-out;box-shadow:0 0 0 2px #4a90e2}
11-
@keyframes eventGlow{0%{box-shadow:0 0 8px 4px rgba(74,144,226,0.6),0 0 0 2px #4a90e2}100%{box-shadow:0 0 0 0 rgba(74,144,226,0),0 0 0 2px #4a90e2}}
10+
.webhook-event-item.new-event{animation:eventGlow 0.5s ease-out;box-shadow:0 0 0 2px #ff7a00}
11+
@keyframes eventGlow{0%{box-shadow:0 0 8px 4px rgba(255,122,0,0.6),0 0 0 2px #ff7a00}100%{box-shadow:0 0 0 0 rgba(255,122,0,0),0 0 0 2px #ff7a00}}
1212
.event-type{font-size:13px;color:#333}
1313
.event-meta{font-size:12px;color:#777}
1414
.event-session-indicators{display:flex;gap:6px;margin-top:6px;align-items:center}
1515
.session-dot{width:10px;height:10px;border-radius:50%;border:1px solid rgba(0,0,0,0.1)}
1616
.no-events{padding:12px;color:#666}
1717
.webhook-inspector-preview{flex:1;padding:12px;overflow:hidden;min-width:0;display:flex;flex-direction:column}
1818
.webhook-inspector-preview > div{display:flex;flex-direction:column;flex:1;min-height:0}
19-
.preview-title{margin-top:0}
20-
.preview-time{margin-bottom:8px;color:#666}
19+
.preview-header{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:8px}
20+
.preview-title{margin:0;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
21+
.preview-time{color:#999;font-size:11px;flex-shrink:0}
2122
.preview-json{background:#fafafa;padding:12px;border-radius:6px;overflow:auto}
2223
.preview-empty{color:#666}
2324

@@ -54,4 +55,3 @@
5455
/* Loading message in list */
5556
.loading-events-message{padding:20px;text-align:center;color:#666;display:flex;flex-direction:column;align-items:center;gap:12px}
5657
.loading-events-spinner{width:32px;height:32px;border:3px solid #e8e8e8;border-top-color:#4a90e2;border-radius:50%;animation:spin 0.8s linear infinite}
57-

src/components/WebhookInspector.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -708,9 +708,10 @@ const WebhookInspector: React.FC<Props> = ({ userPath, selectedDeviceId = null,
708708
<div className="webhook-inspector-preview">
709709
{selectedEvent ? (
710710
<div>
711-
<h4 className="preview-title">{selectedEvent.eventType}</h4>
712-
<div className="preview-time">{new Date(selectedEvent.timestamp).toLocaleString()}</div>
713-
711+
<div className="preview-header">
712+
<h4 className="preview-title">{selectedEvent.eventType}</h4>
713+
<div className="preview-time">{new Date(selectedEvent.timestamp).toLocaleString()}</div>
714+
</div>
714715
{/* Display course information if available for this activity session */}
715716
{(() => {
716717
const { activitySessionId } = getSessionIds(selectedEvent);

0 commit comments

Comments
 (0)