Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Canvas): Use path+scope as VizNode ID #1699

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

lordrip
Copy link
Member

@lordrip lordrip commented Dec 9, 2024

Context

Currently, when transforming a flow into VisualizationNodes, the nodes Ids are randomly generated, causing that whenever there's a change in the structure of the flow, previous Ids change.

Changes

This commit uses the path + scope so the VisualizationNodes IDs are stable between interacting with the flow.

Copy link

codecov bot commented Dec 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.84%. Comparing base (001a9b4) to head (03e7dfb).
Report is 16 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1699      +/-   ##
============================================
+ Coverage     78.62%   78.84%   +0.22%     
  Complexity      365      365              
============================================
  Files           439      465      +26     
  Lines         14234    14570     +336     
  Branches       2769     2792      +23     
============================================
+ Hits          11191    11488     +297     
+ Misses         2954     2813     -141     
- Partials         89      269     +180     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lordrip lordrip force-pushed the fix/ensure-viznode-id-2 branch 2 times, most recently from 90f234f to 548d4fa Compare December 13, 2024 14:37
lordrip added a commit to lordrip/kaoto that referenced this pull request Dec 16, 2024
Currently, the component name is being used as the title in the
`CanvasForm`.

This commit uses the corresponding `Title` property if available from
components, eips and kamelets, and the `ID` as a last resort.

fix: KaotoIO#1462
prerequisite of: KaotoIO#1699
lordrip added a commit to lordrip/kaoto that referenced this pull request Dec 16, 2024
Currently, the component name is being used as the title in the
`CanvasForm`.

This commit uses the corresponding `Title` property if available from
components, eips and kamelets, and the `ID` as a last resort.

fix: KaotoIO#1462
prerequisite of: KaotoIO#1699
lordrip added a commit to lordrip/kaoto that referenced this pull request Dec 16, 2024
Currently, the component name is being used as the title in the
`CanvasForm`.

This commit uses the corresponding `Title` property if available from
components, eips and kamelets, and the `ID` as a last resort.

fix: KaotoIO#1462
prerequisite of: KaotoIO#1699
lordrip added a commit to lordrip/kaoto that referenced this pull request Dec 16, 2024
Currently, the component name is being used as the title in the
`CanvasForm`.

This commit uses the corresponding `Title` property if available from
components, eips and kamelets, and the `ID` as a last resort.

fix: KaotoIO#1462
prerequisite of: KaotoIO#1699
lordrip added a commit to lordrip/kaoto that referenced this pull request Dec 16, 2024
Currently, the component name is being used as the title in the
`CanvasForm`.

This commit uses the corresponding `Title` property if available from
components, eips and kamelets, and the `ID` as a last resort.

fix: KaotoIO#1462
prerequisite of: KaotoIO#1699
@lordrip lordrip force-pushed the fix/ensure-viznode-id-2 branch from 548d4fa to 021c488 Compare December 16, 2024 12:54
lordrip added a commit to lordrip/kaoto that referenced this pull request Dec 16, 2024
Currently, the component name is being used as the title in the
`CanvasForm`.

This commit uses the corresponding `Title` property if available from
components, eips and kamelets, and the `ID` as a last resort.

fix: KaotoIO#1462
prerequisite of: KaotoIO#1699
lordrip added a commit that referenced this pull request Dec 16, 2024
Currently, the component name is being used as the title in the
`CanvasForm`.

This commit uses the corresponding `Title` property if available from
components, eips and kamelets, and the `ID` as a last resort.

fix: #1462
prerequisite of: #1699
@lordrip lordrip force-pushed the fix/ensure-viznode-id-2 branch 7 times, most recently from 18a712f to f0a3183 Compare December 17, 2024 20:41
Comment on lines +38 to +39
// Temporary workaround since the toolbar is updated but the config form is closed
cy.openStepConfigurationTab('setHeader');
Copy link
Member Author

Choose a reason for hiding this comment

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

This will be handled here: #1869

Currently, when transforming a flow into `VisualizationNodes`, the
nodes `Id`s are randomly generated, causing that whenever there's a
change in the structure of the flow, previous `Id`s change.

This commit uses the `path` + `scope` so the `VisualizationNodes` IDs
are stable between interacting with the flow.
@lordrip lordrip force-pushed the fix/ensure-viznode-id-2 branch from f0a3183 to 03e7dfb Compare December 17, 2024 20:44
@lordrip lordrip added this to the 2.4.0 milestone Dec 18, 2024
@lordrip lordrip self-assigned this Dec 18, 2024
@lordrip lordrip marked this pull request as ready for review December 18, 2024 11:18
Copy link
Contributor

@igarashitm igarashitm left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@lordrip lordrip merged commit 6a705f6 into KaotoIO:main Dec 18, 2024
14 checks passed
@lordrip lordrip deleted the fix/ensure-viznode-id-2 branch December 18, 2024 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants