Skip to content

Commit 987cc26

Browse files
Copilotdwarwick
andcommitted
Remove misleading sequential flow connectors between groups
Co-authored-by: dwarwick <15970276+dwarwick@users.noreply.github.com>
1 parent 7086ce7 commit 987cc26

File tree

2 files changed

+1
-33
lines changed

2 files changed

+1
-33
lines changed

JwtIdentity.Client/Pages/Survey/BranchingSurveyEdit.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ else
2929
</TitleContent>
3030
<ChildContent>
3131
<MudAlert Severity="Severity.Info" Class="mb-4">
32-
This diagram shows the flow of your survey based on the branching configuration. Blue boxes indicate conditional branching rules, while dashed arrows show sequential flow.
32+
This diagram shows the flow of your survey based on the branching configuration. Blue boxes indicate conditional branching rules with arrows showing the flow path.
3333
</MudAlert>
3434

3535
@if (Nodes.Any())

JwtIdentity.Client/Pages/Survey/BranchingSurveyEdit.razor.cs

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -628,38 +628,6 @@ private void BuildSyncfusionDiagram()
628628
}
629629
}
630630
}
631-
632-
// Add sequential flow connectors between groups without explicit branching
633-
for (int i = 0; i < QuestionGroups.OrderBy(g => g.GroupNumber).Count() - 1; i++)
634-
{
635-
var currentGroup = QuestionGroups.OrderBy(g => g.GroupNumber).ElementAt(i);
636-
var nextGroup = QuestionGroups.OrderBy(g => g.GroupNumber).ElementAt(i + 1);
637-
638-
// Only add sequential connector if there's no branching from this group
639-
bool hasExplicitBranching = Survey.Questions.Any(q =>
640-
q.GroupId == currentGroup.GroupNumber &&
641-
((q is MultipleChoiceQuestionViewModel mc && mc.Options.Any(o => o.BranchToGroupId.HasValue)) ||
642-
(q is SelectAllThatApplyQuestionViewModel sa && sa.Options.Any(o => o.BranchToGroupId.HasValue)) ||
643-
(q is TrueFalseQuestionViewModel tf && (tf.BranchToGroupIdOnTrue.HasValue || tf.BranchToGroupIdOnFalse.HasValue))));
644-
645-
if (!hasExplicitBranching)
646-
{
647-
var sequentialConnector = new Connector()
648-
{
649-
ID = $"Connector_Group{currentGroup.GroupNumber}_To_Group{nextGroup.GroupNumber}_Sequential",
650-
SourceID = $"Group{currentGroup.GroupNumber}",
651-
TargetID = $"Group{nextGroup.GroupNumber}",
652-
Type = ConnectorSegmentType.Orthogonal,
653-
Style = new ShapeStyle() { StrokeColor = "#9E9E9E", StrokeWidth = 2, StrokeDashArray = "5,5" },
654-
TargetDecorator = new DecoratorSettings()
655-
{
656-
Shape = DecoratorShape.Arrow,
657-
Style = new ShapeStyle() { Fill = "#9E9E9E", StrokeColor = "#9E9E9E" }
658-
}
659-
};
660-
Connectors.Add(sequentialConnector);
661-
}
662-
}
663631
}
664632

665633
private string GetGroupColor(int groupNumber)

0 commit comments

Comments
 (0)