-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Data Mapper): Cherry-picking January Data Mapper changes for pub…
…lic preview (#6470) * Feat(Data Mapper): Panel with warning and error messages (#6315) * started moving to v9 component * api call works * added value * started test * simplifying * update to fix fluent ui bug * component test passes * fixed type error * update version of fluent 9 * updated snapshots * updated lockfile * starting docs * moved over v1 map checker * simple panel works * new error store * added docs and displayed deserialization messages * panels close when others open * added required input checeker * PR prep * PR Comments * updated yaml for tests * feat(Data Mapper): Add keyboard delete, fix circles cutting, handle existing map loading (#6329) * add keyboard delete * only use delete when funciton or edge is selected * remove backspace * update width to handle circles cutting * fix auto layouting * Feat(Data Mapper): UX fixes for Public Preview (#6363) * added new map placeholder * added some colors * custom info label * PR prep * Fix(Data Mapper): Sequence function serialization bug (#6378) * fixed serialization issue * test fix * fix(Data Mapper): Fix circles cutting off (#6379) data mapper update * Fix(Data Mapper): bracket serialization bug (#6385) * fixed bracket bug * fixed typo in test * feat(Data Mapper): Add notification to vscode from DM (#6390) * setup vscode notification * update toast to vscode * fix(Data Mapper): Update Function config panel to fix wrapping, delete logic, placement of action items, info bubble (#6393) * dm font * fix func config panel * update function config 2 * fix style cherry-pick * add remove logic * fix margin * feat(Data Mapper): Add info message and fix placeholders (#6405) info message * Fix(Data Mapper): add new files (#6396) * starting using vscode file api * fixing file fn * file copy works and with schema imports * error message works * added info label * fix(Data Mapper): Update height/width of panel and enhance Error/Warning panel (#6410) * fix height * enhance test panel * fix(Data Mapper): Update string and open all functions by default (#6413) open by default * update strings * merge main * merge * merge string changes * update string * Feat(Data Mapper): Loop message when users try to find loop in functions (#6451) message works * fix(Data Mapper): Fix unnecessary edge when node/parent is not in the search results (#6454) * fix(Data Mapper): Pass in loading as a normal prop since boolean behaves differently (#6456) loading passed * fix(Data Mapper): Remove extra styling and clear out test results (#6459) * update node position on search term change * clear out test panel * update circles * fix(Data Mapper): Add subtitle for error/warning cards (#6464) * node udpates * add subtitle --------- Co-authored-by: DanielleCogs <[email protected]>
- Loading branch information
1 parent
9d14ca2
commit 0ab0b67
Showing
80 changed files
with
2,694 additions
and
681 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Features | ||
Helper docs for how some of our features work | ||
## Error Panel | ||
Checks run by MapCheckerPanel | ||
- Component MapCheckerPanel updates and runs map checks using the connections and schema | ||
- These are not currently stored in Redux, but could be if we allow users to dismiss warnings in the future | ||
- Currently we check for | ||
- Type checking for target schema nodes, but not functions until we get data from the backend | ||
- Missing required inputs on target nodes | ||
- Missing required inputs for functions | ||
|
||
Deserialization Warnings | ||
- We generate warnings during deserialization if we are unable to find nodes or functions | ||
- These warnings are stored in Redux |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
# Serialization | ||
|
||
The process of converting the format used to represent the visual map canvas to LML that can be edited by the user and processed by the backend | ||
|
||
### GenerateMapDefinitionBody | ||
- filters connections for the ones that end in a target node | ||
- loops through these in random order and | ||
- generates key-value pair array for this connection by calling createNewPathItems; this is every pair in the LML from root to final target item | ||
- calls applyValueAtPath for this array of pairs to insert it into the new LML, traversing down to where the pair belongs | ||
|
||
### createNewPathItems | ||
|
||
### applyValueAtPath | ||
- goes from the target connection passed, and using 'pathToRoot', adding all loops and conditionals to the path |
This file contains 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
41 changes: 41 additions & 0 deletions
41
apps/vs-code-designer/src/app/commands/dataMapper/DataMapperPanelUtils.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import path from 'path'; | ||
import { copyFileSync, existsSync as fileExistsSync } from 'fs'; | ||
import { localize } from '../../../localize'; | ||
|
||
export const copyOverImportedSchemas = ( | ||
schemaText: string, | ||
primarySchemaName: string, | ||
pathToContainingFolder: string, | ||
pathToWorkspaceSchemaFolder: string, | ||
ext | ||
) => { | ||
const schemaFileDependencies = [...schemaText.matchAll(/schemaLocation="[A-Za-z.]*"/g)].map((schemaFileAttributeMatch) => { | ||
// Trim down to just the filename | ||
return schemaFileAttributeMatch[0].split('"')[1]; | ||
}); | ||
|
||
schemaFileDependencies.forEach((importedSchemaFileName) => { | ||
const importedSchemaFileFullPath = path.join(pathToContainingFolder, importedSchemaFileName); | ||
|
||
// Check that the schema file dependency exists in the same directory as the primary schema file | ||
if (!fileExistsSync(importedSchemaFileFullPath)) { | ||
ext.showError( | ||
localize( | ||
'SchemaLoadingError', | ||
`Schema loading error: couldn't find schema file import | ||
"{0}" in the same directory as "{1}". "{2}" will still be copied to the Schemas folder.`, | ||
importedSchemaFileName, | ||
pathToContainingFolder, | ||
primarySchemaName | ||
) | ||
); | ||
return; | ||
} | ||
|
||
// Check that the schema file dependency doesn't already exist in the Schemas folder | ||
const newSchemaFilePath = path.join(pathToWorkspaceSchemaFolder, importedSchemaFileName); | ||
if (!fileExistsSync(newSchemaFilePath)) { | ||
copyFileSync(importedSchemaFileFullPath, newSchemaFilePath); | ||
} | ||
}); | ||
}; |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.