Add conditional styling override for nodes and edges#4
Open
jkemmererupgrade wants to merge 14 commits into
Open
Add conditional styling override for nodes and edges#4jkemmererupgrade wants to merge 14 commits into
jkemmererupgrade wants to merge 14 commits into
Conversation
5 tasks
c9fa43c to
9ed29c2
Compare
… conditionalStyle
…ytoscape element data
…rt conditional icons Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…condition + conditionalStyle Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… selectors; add icon preview to conditional pane
fd1caff to
129cc29
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Slice 3 of the 3-slice split of aws#1589, stacking on Slice 2 (#3).
Adds per-type conditional style overrides to vertices and edges. When a node or edge's source property matches a configured condition (
property operator value), a secondary style (color, icon, border, shape, opacity, display properties) overrides the base style in the graph canvas and all previews.Architecture
StyleConditiontype +buildConditionalNodeSelector/buildConditionalEdgeSelectorhelpers inconditionalStyling.tscondition+conditionalStylefields onVertexPreferencesStorageModel/EdgePreferencesStorageModel(optional, excluded from the requiredVertexPreferencesruntime type)renderedEntities.tsflattensvertex.original.attributesinto Cytoscape elementdataasprop_<key>entries so Cytoscape selectors can match them.Datevalues are coerced to ISO strings for lexicographic comparison.useGraphStyles.tsemits additional high-specificity selectors (node[type="X"][prop_known_bad = "true"]) for types that have a condition + conditionalStyle setuseBackgroundImageMap.tsgenerates conditional icon queries keyed as${type}:condConditionalSectioncomponent: property dropdown from schema, operator select filtered by dataType, value input) and a full copy of the style fields wired toconditionalStyle. Selecting a property shows aVertexSymbolpreview of the node with the conditional style applied.defaultStyling.ts) acceptscondition+conditionalStyle— round-trips cleanly through import and exportSupported operators
=,!==,!=,>,<,>=,<=Date values from Neptune are coerced to ISO 8601 strings; comparisons work lexicographically (e.g.
create_date > 2026-03-26).Deliberately NOT in this PR
Validation
pnpm run checks— lint + format + types cleanpnpm test— 1813 / 1813 passpnpm coverage— all 4 thresholds metcondition+conditionalStyleRelated Issues
Check List
pnpm checkspasses with no errors.pnpm testpasses with no failures.docs/features/graph-view.md).