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

fix: update config panel when deleting a connection #13437

Merged
merged 8 commits into from
Sep 9, 2024

Conversation

Jondyr
Copy link
Member

@Jondyr Jondyr commented Aug 29, 2024

Description

This PR changes the logic for tracking which element is selected in process editor. Using the event from diagramjs selection.changed instead of trying to sync our selection through shape.add, shape.remove, connection.remove and element.click.
This solves some other issues like for example: the Ctrl-F finder not updating selected element in the config panel.

Related Issue(s)

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)

Documentation

  • User documentation is updated with a separate linked PR in altinn-studio-docs. (if applicable)

@github-actions github-actions bot added area/process Area: Related to app process (e.g. signing, receipt, fill inn, payment, etc). solution/studio/designer Issues related to the Altinn Studio Designer solution. labels Aug 29, 2024
Copy link

codecov bot commented Aug 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.99%. Comparing base (61e0ab2) to head (1787130).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #13437   +/-   ##
=======================================
  Coverage   93.99%   93.99%           
=======================================
  Files        1456     1456           
  Lines       20106    20108    +2     
  Branches     2438     2438           
=======================================
+ Hits        18899    18901    +2     
  Misses        954      954           
  Partials      253      253           

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

@github-actions github-actions bot added the quality/testing Tests that are missing, needs to be created or could be improved. label Aug 29, 2024
@Jondyr Jondyr marked this pull request as ready for review August 29, 2024 11:07
@Jondyr Jondyr linked an issue Aug 29, 2024 that may be closed by this pull request
Copy link
Contributor

@standeren standeren left a comment

Choose a reason for hiding this comment

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

Nice solution! 🤩
I only miss a more descriptive test-case for the triggering of selection.changed event.
And I have a suggestion removing the oldSelection variable since it does not look like we need it (yet), but I also see the pros of keeping it, so that one is up to you 😬

Copy link
Contributor

@standeren standeren left a comment

Choose a reason for hiding this comment

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

Nice changes!
But can we avoid using any for the currentEventType?

@Jondyr
Copy link
Member Author

Jondyr commented Sep 3, 2024

Nice changes! But can we avoid using any for the currentEventType?

I'm not sure what would make sense to type it as, as I'm unsure if bpmn-js or diagram-js exports typedefiniton for their events, i find the documentation very hard to navigate/search so it might be there somewhere and i've just not found it yet.

Copy link
Contributor

@TomasEng TomasEng left a comment

Choose a reason for hiding this comment

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

Testet OK.

@Jondyr Jondyr merged commit c846ca6 into main Sep 9, 2024
17 checks passed
@Jondyr Jondyr deleted the fix/update-config-panel-when-deleting-an-association branch September 9, 2024 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/process Area: Related to app process (e.g. signing, receipt, fill inn, payment, etc). quality/testing Tests that are missing, needs to be created or could be improved. solution/studio/designer Issues related to the Altinn Studio Designer solution.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Config panel not updated after deleting an association
3 participants