WIP: Draft: feat: added editor warning system and more user feedback #45

Closed
j.gerla wants to merge 43 commits from feat/editor-user-feedback into dev
Showing only changes of commit e9acab456e - Show all commits

View File

@@ -76,7 +76,26 @@ export function editorWarningRegistry(get: ZustandGet, set: ZustandSet) : Editor
['WARNING', new Set<{ nodeId: NodeId, warningKey: WarningKey}>()] ['WARNING', new Set<{ nodeId: NodeId, warningKey: WarningKey}>()]
]), ]),
getWarningsBySeverity: (_warningSeverity) => { return []}, getWarningsBySeverity: (warningSeverity) => {
const wRegistry = get().editorWarningRegistry;
const sIndex = get().severityIndex;
const warningKeys = sIndex.get(warningSeverity);
const warnings: EditorWarning[] = [];
warningKeys?.forEach(
({nodeId, warningKey}) => {
const warning = wRegistry.get(nodeId)?.get(warningKey);
if (warning) {
warnings.push(warning);
}
}
)
return warnings;
},
isProgramValid: () => { return true}, isProgramValid: () => { return true},