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

bjorn/cnx-1111-switching-documents-does-not-invalidate-active-connector #528

Conversation

bjoernsteinhagen
Copy link
Contributor

@bjoernsteinhagen bjoernsteinhagen commented Jan 28, 2025

Description & motivation

  • Related to CNX-1111.
  • When user opens a new Etabs model without closing the plugin, the model cards associated with the previous model remain visible.

Changes:

  • Polling in the CsiDocumentModelStore to detect changes in the ModelFilename. A change indicates a new model at which point we reload.

Screenshots:

Before Changes

See video in CNX-1111.

After Changes

Reloading.Plugin.mp4

Checklist:

  • My pull request follows the guidelines in the Contributing guide?
  • My pull request does not duplicate any other open Pull Requests for the same update/change?
  • My commits are related to the pull request and do not amend unrelated code or documentation.
  • My code follows a similar style to existing code.
  • I have added appropriate tests.
  • I have updated or added relevant documentation.

@bjoernsteinhagen
Copy link
Contributor Author

@oguzhankoral we're now polling in two places (😢):

  • SpeckleFormBase.cs - to check when and if a user opens a new model
  • CsiSharedSelectionBinding.cs - to check when a Selection changes.

Thoughts?

Copy link

codecov bot commented Jan 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 15.86%. Comparing base (9e18134) to head (6ac5191).
Report is 1 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #528   +/-   ##
=======================================
  Coverage   15.86%   15.86%           
=======================================
  Files         238      238           
  Lines        4720     4720           
  Branches      578      578           
=======================================
  Hits          749      749           
  Misses       3941     3941           
  Partials       30       30           

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

Copy link
Member

@oguzhankoral oguzhankoral left a comment

Choose a reason for hiding this comment

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

I would handle doc switch on DocumentStore and call LoadState, it should ideally trigger refreshing the state

@bjoernsteinhagen bjoernsteinhagen enabled auto-merge (squash) January 28, 2025 15:36
@bjoernsteinhagen bjoernsteinhagen merged commit 03f0b1f into dev Jan 28, 2025
5 checks passed
@bjoernsteinhagen bjoernsteinhagen deleted the bjorn/cnx-1111-switching-documents-does-not-invalidate-active-connector branch January 28, 2025 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants