Skip to content

chore(DATAGO-122599): update activity diagram styling#1056

Open
jessieli-ux wants to merge 39 commits intomainfrom
jessie/DATAGO-122599/update-activity-diagram-styling
Open

chore(DATAGO-122599): update activity diagram styling#1056
jessieli-ux wants to merge 39 commits intomainfrom
jessie/DATAGO-122599/update-activity-diagram-styling

Conversation

@jessieli-ux
Copy link
Collaborator

@jessieli-ux jessieli-ux commented Feb 20, 2026

What is the purpose of this change?

Modernize the activity diagram visualization to improve visual consistency, enhance dark mode support, and better integrate with the application's design system. The previous implementation used inconsistent styling patterns, hardcoded colors, and had significant code duplication across node components.

How was this change implemented?

Extracted Node Styles

  • Added nodeStyles.ts with centralized style constants (RECTANGULAR, RECTANGULAR_COMPACT, PILL, CONTAINER_HEADER) to be consistent with how Workflow visualization handles it

Redesigned AgentNode Component

  • Added 32px circular accent background for Bot icon
  • Extracted reusable AgentHeader component to eliminate duplication
  • Set minimum width of 150px for consistent sizing

Unified Container Nodes (Loop, Map, WorkflowGroup)

  • Implemented straddling header design with dotted container background to match Workflow visualization
  • Used stateLayer-w10 variable for light mode backgrounds and applied temporary hex value (#FFFFFF1a) for dark mode (to be replaced with theme mapping)

Enhanced Tool & LLM Nodes

  • Replaced inline artifact count text with Badge component
  • Added vertical centering with flex-col justify-center
  • Set 50px minimum height for better proportions

Refactored Edge Rendering

  • Converted inline style objects to CSS classes with theme variables
  • Improved connector line consistency across all node types

Theme Integration

  • Replaced some hardcoded colors (gray-300, blue-500, indigo-600) with theme palette variables

Key Design Decisions

AgentNode Container Design
Chose solid container with divider over dotted overlay because:

  • Provides clearer visual containment (nodes truly "inside" the agent)
  • Matches the design mockup provided
  • Easier to distinguish from workflow group containers

Temporary Dark Mode Hex Values
Used dark:bg-[#FFFFFF1a] for stateLayer backgrounds because:

  • Theme mapping system only accepts palette paths, not direct hex values
  • Preferred quick iteration over architectural changes to mapping system
  • Added comments indicating these should be replaced with proper theme mapping

Shared Style Constants
Extracted common patterns to nodeStyles.ts because:

  • Eliminates duplication across 8+ node components
  • Makes global style updates trivial (change once, applies everywhere)
  • Enforces consistency automatically

How was this change tested?

  • Manual testing: Verified all node types (Agent, Tool, LLM, Loop, Map, Switch, WorkflowGroup) in both collapsed and expanded states
  • Manual testing: Tested light and dark theme switching for all components
  • Manual testing: Verified selection states, hover effects, and processing animations
  • Manual testing: Checked parallel branch rendering and dotted containers
  • Manual testing: Confirmed artifact badges display correctly on tool nodes
  • Unit tests: Not added (existing tests should still pass)
  • Integration tests: Not applicable
  • Known limitations: Dark mode stateLayer backgrounds use temporary hex values pending theme mapping update

Is there anything the reviewers should focus on/be aware of?

Temporary Dark Mode Colors
Several components use dark:bg-[#FFFFFF1a] as a temporary solution. Look for comments marked with "Dark mode background colour should be removed once the stateLayer-w10 is mapped to its correct dark mode value." These should be replaced once stateLayer-w10 and stateLayer-w20 are properly mapped in themeMapping.ts.

Badge Component Import
ToolNode now imports the Badge component. Ensure this doesn't introduce any unexpected styling conflicts or bundle size issues.

Screenshot 2026-02-26 at 7 07 11 PM Screenshot 2026-02-26 at 7 07 22 PM Screenshot 2026-02-26 at 7 07 29 PM Screenshot 2026-02-26 at 7 07 53 PM Screenshot 2026-02-26 at 7 07 46 PM Screenshot 2026-02-26 at 7 07 40 PM

jessieli-ux and others added 24 commits February 12, 2026 15:49
…-styling

Resolved merge conflicts in activity diagram components:
- Updated color styling to use CSS variables (pillColorClasses)
- Maintained connector styling consistency with CONNECTOR_SIZES and CONNECTOR_LINE_CLASSES
- Updated WorkflowDetailPanel to use NavItem component
- Aligned with main branch styling standards

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link

github-actions bot commented Feb 20, 2026

WhiteSource Policy Violation Summary

✅︎ No Blocking Whitesource Policy Violations found in solaceai/solace-agent-mesh-ui-pr-1056!

@jessieli-ux jessieli-ux changed the title Jessie/datago 122599/update activity diagram styling chore(datago-122599: update activity diagram styling Feb 26, 2026
@jessieli-ux jessieli-ux changed the title chore(datago-122599: update activity diagram styling chore(datago-122599): update activity diagram styling Feb 26, 2026
@jessieli-ux jessieli-ux changed the title chore(datago-122599): update activity diagram styling chore(DATAGO-122599): update activity diagram styling Feb 26, 2026
@jessieli-ux jessieli-ux marked this pull request as ready for review February 27, 2026 03:04
Copy link
Collaborator

@lgh-solace lgh-solace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Jessie! Looks clean with perhaps a couple things to tidy. Also, just wondering f the contrast between the colours is strong enough?

They are looking very close to me. Thoughts?

Image

// Render parallel block - children displayed side-by-side with bounding box
return (
<div key={child.id} className="flex flex-row items-start gap-4 rounded-lg border-2 border-dashed border-gray-300 bg-gray-50/50 p-4 dark:border-gray-600 dark:bg-gray-800/50">
<div key={child.id} className="flex flex-row items-start gap-4 rounded border-1 border-dashed border-(--color-secondary-w40) bg-(--color-stateLayer-w10) p-4 dark:border-(--color-secondary-w70) dark:bg-[#FFFFFF1a]">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am adding the dark theme soon and will try to remember to correct this...

{/* Pill label */}
<div
className={`cursor-pointer rounded-full border-2 px-4 py-2 shadow-sm transition-all duration-200 ease-in-out hover:scale-105 hover:shadow-md ${pillColorClasses} ${isSelected ? "ring-2 ring-blue-500" : ""}`}
className={`${ACTIVITY_NODE_BASE_STYLES.PILL} ${pillColorClasses} ${isSelected ? ACTIVITY_NODE_SELECTED_CLASS : ""}`}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's slightly more efficient to use this pattern if you could use that? I will update the best practices document.

className={cn(ACTIVITY_NODE_BASE_STYLES.PILL, pillColorClasses, isSelected && ACTIVITY_NODE_SELECTED_CLASS)}

// Format condition for display (truncate if too long)
const formatCondition = (condition?: string) => {
if (!condition) return null;
const maxLen = 30;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull this constant out too (with LOOP_WIDTH)?

}
};
// Layout constants
const HEADER_HEIGHT = 44;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there are enough of them and they are broadly shared across files, we could consider having some kind of layoutConstants.ts file where they can kept together and exported.

}}
>
<div className="flex items-center gap-2 px-4 py-2">
<Wrench className="h-4 w-4 flex-shrink-0 text-cyan-600 dark:text-cyan-400" />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we pick a theme accent colour for this cyan?

* Shared styling constants for Activity Flow Chart nodes
* Aligned with workflow visualization design patterns
* Based on Figma Card component design (resting state)
*/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likely don't need this top comment. And, we could add and export a layout object here with constants?

isExpanded: isManuallyExpanded,
},
};
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code here seems a bit repetitive. It looks like all 4 returns could be simplified to something like...

if (node.type === "map" || node.type === "loop") {

    const collapsedChildren = node.children.length > 0 ? node.children.map(child => collapseNestedAgents(child, nestingLevel + 1, expandedNodeIds)) : undefined;

    return {
            ...node,
            children: collapsedChildren,
            data: {
                ...node.data,
                isExpanded: isManuallyExpanded,
            },
        };
    };
}

@lgh-solace
Copy link
Collaborator

One other small thing - not sure if it came in this PR or is pre-existing, but the arrow heads and kind of lost under these.

image

@sonarqube-solacecloud
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants