Skip to content

Commit 7070fa2

Browse files
Claudeclaude
andcommitted
Add activity count overlays and recent contacts popup on connections
Re-implements activity count badges on flow connections and the recent contacts hover popup, replacing the previous jsPlumb overlay system with HTML div elements positioned on the canvas. Increases exit stub from 20 to 30px and re-enables activity polling. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 102d43d commit 7070fa2

File tree

3 files changed

+430
-10
lines changed

3 files changed

+430
-10
lines changed

src/flow/Editor.ts

Lines changed: 113 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -446,8 +446,10 @@ export class Editor extends RapidElement {
446446
fill: var(--color-connectors);
447447
}
448448
449-
#canvas.read-only-connections svg.plumb-connector {
450-
pointer-events: none;
449+
#canvas.read-only-connections svg.plumb-connector,
450+
#canvas.read-only-connections svg.plumb-connector * {
451+
pointer-events: none !important;
452+
cursor: default !important;
451453
}
452454
453455
svg.plumb-connector.removing path {
@@ -481,6 +483,114 @@ export class Editor extends RapidElement {
481483
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
482484
}
483485
486+
/* Activity overlay badges on connection exit stubs */
487+
.activity-overlay {
488+
position: absolute;
489+
background: #f3f3f3;
490+
border: 1px solid #d9d9d9;
491+
color: #333;
492+
border-radius: 4px;
493+
padding: 2px 4px;
494+
font-size: 10px;
495+
font-weight: 600;
496+
line-height: 0.9;
497+
cursor: pointer;
498+
z-index: 500;
499+
pointer-events: auto;
500+
white-space: nowrap;
501+
user-select: none;
502+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
503+
}
504+
505+
#grid.viewing-revision .activity-overlay {
506+
opacity: 0.5;
507+
pointer-events: none;
508+
}
509+
510+
/* Recent contacts popup */
511+
@keyframes popupBounceIn {
512+
0% {
513+
transform: scale(0.8);
514+
opacity: 0;
515+
}
516+
50% {
517+
transform: scale(1.05);
518+
}
519+
100% {
520+
transform: scale(1);
521+
opacity: 1;
522+
}
523+
}
524+
525+
.recent-contacts-popup {
526+
display: none;
527+
position: absolute;
528+
width: 200px;
529+
background: #f3f3f3;
530+
border-radius: 10px;
531+
box-shadow: 0 1px 3px 1px rgba(130, 130, 130, 0.2);
532+
z-index: 1015;
533+
transform-origin: top center;
534+
}
535+
536+
.recent-contacts-popup.show {
537+
display: block;
538+
animation: popupBounceIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
539+
}
540+
541+
.recent-contacts-popup .popup-title {
542+
background: #999;
543+
color: #fff;
544+
padding: 6px 0;
545+
text-align: center;
546+
border-top-left-radius: 10px;
547+
border-top-right-radius: 10px;
548+
font-size: 12px;
549+
}
550+
551+
.recent-contacts-popup .no-contacts-message {
552+
padding: 15px;
553+
text-align: center;
554+
color: #999;
555+
font-size: 12px;
556+
}
557+
558+
.recent-contacts-popup .contact-row {
559+
padding: 8px 10px;
560+
border-top: 1px solid #e0e0e0;
561+
text-align: left;
562+
}
563+
564+
.recent-contacts-popup .contact-row:last-child {
565+
border-bottom-left-radius: 10px;
566+
border-bottom-right-radius: 10px;
567+
}
568+
569+
.recent-contacts-popup .contact-name {
570+
display: block;
571+
font-weight: 500;
572+
font-size: 12px;
573+
color: var(--color-link-primary, #1d4ed8);
574+
cursor: pointer;
575+
}
576+
577+
.recent-contacts-popup .contact-name:hover {
578+
text-decoration: underline;
579+
}
580+
581+
.recent-contacts-popup .contact-operand {
582+
padding-top: 3px;
583+
font-size: 11px;
584+
color: #666;
585+
word-wrap: break-word;
586+
}
587+
588+
.recent-contacts-popup .contact-time {
589+
padding-top: 3px;
590+
font-size: 10px;
591+
color: #999;
592+
}
593+
484594
/* Connection target feedback */
485595
temba-flow-node.connection-target-valid {
486596
outline: 3px solid var(--color-success, #22c55e) !important;
@@ -998,7 +1108,7 @@ export class Editor extends RapidElement {
9981108
}
9991109

10001110
this.activityTimer = window.setTimeout(() => {
1001-
// this.fetchActivityData();
1111+
this.fetchActivityData();
10021112
}, this.activityInterval);
10031113
});
10041114
}

0 commit comments

Comments
 (0)