Skip to content

Commit

Permalink
cleanump
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielleCogs committed Jun 10, 2024
1 parent 0fe3b7b commit 2d9886a
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 29 deletions.
15 changes: 4 additions & 11 deletions libs/data-mapper-v2/src/components/commandBar/EditorCommandBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const EditorCommandBar = (props: EditorCommandBarProps) => {
try {
const newDataMapDefinition = convertToMapDefinition(currentConnections, sourceSchema, targetSchema, targetSchemaSortArray);

// danielle add this back later
// this can be added later
// if (saveDraftStateCall) {
// saveDraftStateCall(newDataMapDefinition);
// }
Expand Down Expand Up @@ -106,24 +106,17 @@ export const EditorCommandBar = (props: EditorCommandBarProps) => {
// );
// }

const mapMetadata = JSON.stringify(generateMapMetadata(functions, currentConnections));
const mapMetadata = JSON.stringify(generateMapMetadata(functions, currentConnections));

DataMapperFileService().saveMapDefinitionCall(dataMapDefinition, mapMetadata);
DataMapperFileService().saveMapDefinitionCall(dataMapDefinition, mapMetadata);

dispatch(
saveDataMap({
sourceSchemaExtended: sourceSchema,
targetSchemaExtended: targetSchema,
})
);
}, [
currentConnections,
functions,
dataMapDefinition,
sourceSchema,
targetSchema,
dispatch,
]);
}, [currentConnections, functions, dataMapDefinition, sourceSchema, targetSchema, dispatch]);

const triggerDiscardWarningModal = useCallback(() => {
dispatch(openDiscardWarningModal());
Expand Down
2 changes: 0 additions & 2 deletions libs/data-mapper-v2/src/constants/FunctionConstants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import {
ArrowSwap20Regular,
} from '@fluentui/react-icons';

// danielle revisit this

export interface FunctionGroupBranding {
displayName: string;
colorTokenName: string;
Expand Down
8 changes: 0 additions & 8 deletions libs/data-mapper-v2/src/constants/ReactFlowConstants.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
import { tokens } from '@fluentui/react-components';
import { SchemaType } from '@microsoft/logic-apps-shared';

// danielle strip this

export const checkerboardBackgroundImage = `repeating-linear-gradient(45deg, ${tokens.colorNeutralBackground1} 25%, transparent 25%, transparent 75%, ${tokens.colorNeutralBackground1} 75%, ${tokens.colorNeutralBackground1}), repeating-linear-gradient(45deg, ${tokens.colorNeutralBackground1} 25%, ${tokens.colorNeutralBackground2} 25%, ${tokens.colorNeutralBackground2} 75%, ${tokens.colorNeutralBackground1} 75%, ${tokens.colorNeutralBackground1})`;

export const defaultCanvasZoom = 1.25;
export const reactFlowFitViewOptions = { maxZoom: defaultCanvasZoom, includeHiddenNodes: true };

export const ReactFlowNodeType = {
SchemaNode: 'schemaNode',
FunctionNode: 'functionNode',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@ export interface IDataMapperFileService {
* Saves both the data map definition and metadata to the filesystem.
* @arg {string} dataMapDefinition - The map definition as a string.
* @arg {string} mapMetadata - Map metadata to be saved, as a string.
* @return {null}
* @return {null} we get the output from the store
*/
saveMapDefinitionCall(dataMapDefinition: string, mapMetadata: string): void;

// danielle fix these later
/**
* Gets all schemas from the filesystem from the Schemas folder.
* @return {null}
* @return {null} we get the output from the store
*/
readCurrentSchemaOptions(): void;
}
Expand Down
2 changes: 0 additions & 2 deletions libs/data-mapper-v2/src/models/Connection.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import type { FunctionData } from './Function';
import type { SchemaNodeExtended } from '@microsoft/logic-apps-shared';

// danielle this could change

export type ConnectionDictionary = { [key: string]: Connection }; // key = "{(target)||(source)}-{nodeId}"
export type InputConnectionDictionary = { [inputNumber: string]: InputConnection[] };
export type InputConnection = ConnectionUnit | string | undefined; // undefined for unbounded input value arrays
Expand Down
2 changes: 0 additions & 2 deletions libs/data-mapper-v2/src/utils/Icon.Utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,6 @@ export const iconUriForIconImageName = (iconImageName: string) => {
return `${iconBaseUrl}${iconImageName}`;
};

// danielle for function icons coming from fluent, changing the font size works

export const iconForFunction = (functionKey: string, color: string, iconSize: number) => {
const defaultStyle = { height: iconSize, width: iconSize, margin: 'auto', fontSize: `${iconSize}px` };
const coloredDefaultStyle = { ...defaultStyle, color };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ export const InitSearchService = (searchService: ISearchService): void => {
};

export const SearchService = (): ISearchService => {
// Danielle: we need this for every service, how do we extract?
if (!service) {
throw new AssertionException(AssertionErrorCode.SERVICE_NOT_INITIALIZED, 'SearchService needs to be initialized before using');
}
Expand Down

0 comments on commit 2d9886a

Please sign in to comment.