Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

feat(viz): add ability to insert branch steps #1140

Merged
merged 1 commit into from
Jan 23, 2023

Conversation

kahboom
Copy link
Contributor

@kahboom kahboom commented Jan 20, 2023

This PR adds the ability to insert a step in between two branch steps. Resolves #1114.

Changes

  • Add check in mini catalog to validate inserting branch steps
  • Add handling in mini catalog step selection for branch steps
  • Enable insert edge type for branch steps
  • Extract insertStep logic into its own testable function
  • Improve query params for API request to be more accurate with source/target step
  • Improve typings

Screenshots

Kapture 2023-01-20 at 11 09 00-2

fix(viz): use correct index for insert branch step
@kahboom kahboom requested a review from a team January 20, 2023 12:02
@sonarcloud
Copy link

sonarcloud bot commented Jan 20, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codecov
Copy link

codecov bot commented Jan 20, 2023

Codecov Report

Merging #1140 (198a753) into main (8454fd9) will decrease coverage by 0.12%.
The diff coverage is 29.03%.

@@            Coverage Diff             @@
##             main    #1140      +/-   ##
==========================================
- Coverage   48.43%   48.31%   -0.12%     
==========================================
  Files          51       51              
  Lines        1627     1631       +4     
  Branches      364      368       +4     
==========================================
  Hits          788      788              
- Misses        793      798       +5     
+ Partials       46       45       -1     
Impacted Files Coverage Δ
src/components/PlusButtonEdge.tsx 32.43% <20.83%> (-15.40%) ⬇️
src/store/integrationJsonStore.tsx 22.36% <33.33%> (ø)
src/services/visualizationService.ts 85.78% <66.66%> (+0.14%) ⬆️
src/services/validationService.ts 9.52% <100.00%> (ø)
src/components/VisualizationStepViews.tsx 10.41% <0.00%> (-0.58%) ⬇️
src/components/Visualization.tsx 40.74% <0.00%> (+3.14%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@mmelko mmelko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If only one step is left in the branch, I'm not able to add any step into that branch anymore: see: Screenshot 2023-01-20 at 13 37 27

@kahboom
Copy link
Contributor Author

kahboom commented Jan 20, 2023

@mmelko but how would you know whether the user wants to add a step to the branch or to the main integration? for this thing I think we would need to have a design review and also be working on 1) showing which steps are part of a branch #1133, and 2) building branches visually #786.

@mmelko
Copy link
Contributor

mmelko commented Jan 20, 2023

So the simplest would be to have 2x + one in the branch and second at the integration level before the first step of the first step after branches (filter step in this cas)

@kahboom
Copy link
Contributor Author

kahboom commented Jan 20, 2023

I don't see a filter step, but I think I know what you mean. But that's why I mentioned prepend step would need to be supported, and right now it's not. To me that should be in a separate PR.

Actually I'm thinking about it and even if we allowed appending/prepending steps in a branch, it will look really weird to users until we solve #1133 , because it will have two + buttons in between two steps, the user won't know the difference between those buttons, or know that one is to add inside of a branch and the other for outside of the branch.

@mmelko mmelko self-requested a review January 23, 2023 12:39
@mmelko mmelko merged commit 40352b0 into KaotoIO:main Jan 23, 2023
@kahboom kahboom deleted the branch-step-insert branch January 23, 2023 13:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ability to insert a step between two branch steps
2 participants