From 02feb1613656646fb5b7c8199d60c4802a96d3c0 Mon Sep 17 00:00:00 2001 From: AbdulTheActivePiecer Date: Tue, 17 Oct 2023 16:36:42 +0300 Subject: [PATCH 1/4] chore: always show step actions if they are hovered or step is hovered --- .../actions-container/actions-container.component.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/ui/feature-builder-canvas/src/lib/flow-item-tree/flow-item/actions/actions-container/actions-container.component.html b/packages/ui/feature-builder-canvas/src/lib/flow-item-tree/flow-item/actions/actions-container/actions-container.component.html index 16c3273449..0e7584997b 100644 --- a/packages/ui/feature-builder-canvas/src/lib/flow-item-tree/flow-item/actions/actions-container/actions-container.component.html +++ b/packages/ui/feature-builder-canvas/src/lib/flow-item-tree/flow-item/actions/actions-container/actions-container.component.html @@ -19,8 +19,8 @@ ap-bg-white ap-border-solid ap-border-[1px] ap-border-line ap-w-[40px] ap-h-[40px] ap-overflow-hidden" apTrackHover #deleteStepContainer="hoverTrackerDirective" - [class.ap-opacity-100]="(stepHovered || deleteStepContainer.isHovered)" - [class.ap-opacity-0]="(!stepHovered && !deleteStepContainer.isHovered)" + [class.ap-opacity-100]="(stepHovered || deleteStepContainer.isHovered || duplicateStepContainer.isHovered )" + [class.ap-opacity-0]="(!stepHovered && !deleteStepContainer.isHovered && !duplicateStepContainer.isHovered)" [class.ap-hidden]="isDragging$ | async"> @@ -34,7 +34,7 @@ ap-bg-white ap-border-solid ap-border-[1px] ap-border-line ap-w-[40px] ap-h-[40px] ap-overflow-hidden" apTrackHover #duplicateStepContainer="hoverTrackerDirective" - [class.ap-opacity-100]="(stepHovered || duplicateStepContainer.isHovered)" + [class.ap-opacity-100]="(stepHovered || duplicateStepContainer.isHovered || deleteStepContainer.isHovered)" [class.ap-opacity-0]="(!stepHovered && !duplicateStepContainer.isHovered)" [class.ap-hidden]="isDragging$ | async"> From 2c0405c84f9a3a3b41861afdeac8d30e79d3f661 Mon Sep 17 00:00:00 2001 From: AbdulTheActivePiecer Date: Tue, 17 Oct 2023 16:37:05 +0300 Subject: [PATCH 2/4] chore: select newly duplicated step after duplicating the original --- .../lib/store/builder/canvas/canvas.reducer.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/packages/ui/feature-builder-store/src/lib/store/builder/canvas/canvas.reducer.ts b/packages/ui/feature-builder-store/src/lib/store/builder/canvas/canvas.reducer.ts index ba00dc39a3..208a3890f9 100755 --- a/packages/ui/feature-builder-store/src/lib/store/builder/canvas/canvas.reducer.ts +++ b/packages/ui/feature-builder-store/src/lib/store/builder/canvas/canvas.reducer.ts @@ -169,6 +169,11 @@ const __CanvasReducer = createReducer( const clonedFlowVersionWithArtifacts: FlowVersion = JSON.parse( JSON.stringify(operation.flowVersionWithArtifacts) ); + const newStepName = flowHelper.findAvailableStepName( + state.displayedFlowVersion, + 'step' + ); + clonedState.displayedFlowVersion = flowHelper.apply( clonedFlowVersionWithArtifacts, { @@ -178,7 +183,17 @@ const __CanvasReducer = createReducer( }, } ); - return clonedState; + return { + ...clonedState, + focusedStep: flowHelper.getStep( + clonedState.displayedFlowVersion, + newStepName + ), + rightSidebar: { + type: RightSideBarType.EDIT_STEP, + props: 'NO_PROPS', + }, + }; }), on(FlowsActions.updateTrigger, (state, { operation }): CanvasState => { const clonedState: CanvasState = JSON.parse(JSON.stringify(state)); From 5db08e48f3d48a80388fe07a65aec86ea5993af4 Mon Sep 17 00:00:00 2001 From: AbdulTheActivePiecer Date: Tue, 17 Oct 2023 16:38:47 +0300 Subject: [PATCH 3/4] fix: fixed warn buttons color and checkboxes colors --- .../ui/core/src/assets/scss/ng-material-override.scss | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/ui/core/src/assets/scss/ng-material-override.scss b/packages/ui/core/src/assets/scss/ng-material-override.scss index 1df10ff998..54dee1edf5 100644 --- a/packages/ui/core/src/assets/scss/ng-material-override.scss +++ b/packages/ui/core/src/assets/scss/ng-material-override.scss @@ -645,8 +645,14 @@ mat-icon[data-mat-icon-name="custom_expand_less"] { } .mat-mdc-raised-button.mat-warn { - --mdc-protected-button-label-text-color: var(--warn-palette-contrast-500) ; + --mdc-protected-button-label-text-color: var(--warn-palette-contrast-300) ; } + .mat-mdc-checkbox.mat-primary { + --mdc-checkbox-selected-checkmark-color: var(--primary-palette-contrast-500); +} +.mat-mdc-checkbox.mat-warn { + --mdc-checkbox-selected-checkmark-color: var(--primary-palette-contrast-500); +} .material-suffix-icon { padding-right: max(16px, calc(var(--mdc-shape-small, 4px) + 4px));; From 5ce27c13757ac8a82ed5d44d01188ec567f9d16d Mon Sep 17 00:00:00 2001 From: AbdulTheActivePiecer Date: Tue, 17 Oct 2023 17:22:08 +0300 Subject: [PATCH 4/4] fix: hide duplicate step if both actions are not hovered --- .../actions/actions-container/actions-container.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ui/feature-builder-canvas/src/lib/flow-item-tree/flow-item/actions/actions-container/actions-container.component.html b/packages/ui/feature-builder-canvas/src/lib/flow-item-tree/flow-item/actions/actions-container/actions-container.component.html index 0e7584997b..88a98d9b5a 100644 --- a/packages/ui/feature-builder-canvas/src/lib/flow-item-tree/flow-item/actions/actions-container/actions-container.component.html +++ b/packages/ui/feature-builder-canvas/src/lib/flow-item-tree/flow-item/actions/actions-container/actions-container.component.html @@ -35,7 +35,7 @@ ap-border-line ap-w-[40px] ap-h-[40px] ap-overflow-hidden" apTrackHover #duplicateStepContainer="hoverTrackerDirective" [class.ap-opacity-100]="(stepHovered || duplicateStepContainer.isHovered || deleteStepContainer.isHovered)" - [class.ap-opacity-0]="(!stepHovered && !duplicateStepContainer.isHovered)" + [class.ap-opacity-0]="(!stepHovered && !duplicateStepContainer.isHovered && !deleteStepContainer.isHovered )" [class.ap-hidden]="isDragging$ | async">