GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Keep the rejected call marked on each transition without an unmet con… · liquid-java/vscode-liquidjava@5a5ec09

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • client/src/webview
    • diagram.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎client/src/webview/diagram.ts‎

Copy file name to clipboardExpand all lines: client/src/webview/diagram.ts
+5-7Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,9 @@ export function createMermaidDiagram(
5151

5252
const lines: string[] = [];
5353
const errorFocus = getStateErrorFocus(sm);
54-
// when the call's condition here names another state set whose state rejects it,
55-
// the call is drawn as usual and that condition is marked instead
54+
// when a transition of the call needs a state of another state set whose state rejects it,
55+
// it is drawn as usual and that condition is marked instead
5656
const rejectingStateSets = getRejectingStateSets(sm, stateSets);
57-
const isUnmet = (transition: LJStateMachine['transitions'][number]) =>
58-
hasUnmetCondition(transition, sm, stateSets, rejectingStateSets);
59-
const hasUnmetCall = sm.transitions.some(isUnmet);
6057
const relatedStates = focusOnError && errorFocus ? getRelatedStates(errorFocus) : [];
6158
const isDimmed = (state: string) => relatedStates.length > 0 && !relatedStates.includes(state);
6259
// focusing collapses the dimmed methods of each label, so the diagram is laid out again around the error
@@ -119,12 +116,13 @@ export function createMermaidDiagram(
119116
const isCalledMethod = transition.label === sm.errorContext?.calledMethod;
120117
// in focus mode, only the failed method stays bright
121118
const dimmed = collapse && !isCalledMethod;
119+
const unmet = hasUnmetCondition(transition, sm, stateSets, rejectingStateSets);
122120
const label = getTransitionLabel(
123121
transition.label,
124-
getFromConditionLabel(transition.fromCondition, stateSets, isUnmet(transition) ? rejectingStateSets : null, showConditions),
122+
getFromConditionLabel(transition.fromCondition, stateSets, unmet ? rejectingStateSets : null, showConditions),
125123
transition.toCondition,
126124
showConditions,
127-
isCalledMethod && !hasUnmetCall,
125+
isCalledMethod && !unmet,
128126
);
129127
if (!transitionMap.has(key)) transitionMap.set(key, { bright: [], dimmed: [] });
130128
const group = transitionMap.get(key)!;

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.