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

[BUG] When the goal claim is collapsed, the assurance case seems to disappear #491

Closed
chrisdburr opened this issue Jun 19, 2024 · 13 comments
Assignees
Labels
bug Something isn't working improved navigation Sprint 1: Improved navigation of cases

Comments

@chrisdburr
Copy link
Collaborator

Issue

When working with large assurance cases, collapsing the goal claim creates a situation where it seems as though the case has disappeared. While it is just the case that the case is off-screen, and clicking the Focus button in the toolbar brings back the case, it is confusing for new users.

issue.mp4

Furthermore, when the case is then expanded, it is not centred upon the element that has been expanded.

Desirable behaviour

  1. When an assurance case element is expanded/collapsed, the viewport should remain centred upon the expanded/collapsed element.
@RichGriff
Copy link
Collaborator

@chrisdburr You previously asked me to remove the re-focus element when collapsing nodes as you said it was weird behaviour? As this is the reason why i added it so it would always center for users.

The toggle on goal is only happening for larger charts so will look into why this is happening.

@chrisdburr
Copy link
Collaborator Author

@chrisdburr You previously asked me to remove the re-focus element when collapsing nodes as you said it was weird behaviour? As this is the reason why i added it so it would always center for users.

The toggle on goal is only happening for larger charts so will look into why this is happening.

I think there was a miscommunication here, @RichGriff. The desirable behaviour is for the case to remain centred on the specific element that was being edited—not the centre of the case, which will necessarily change as elements are added/deleted.

@RichGriff
Copy link
Collaborator

@chrisdburr the only thing that is available it the fitView() which will center the case - as it tries its best to fit the chart in the current viewport - I havent come across anything that focuses on the node that has been selected (will investigate).

However, I have been looking at the bug issue, and tried to re-apply some logic to the toggle function. Can you review the video below please and let me know what you think.

Screen.Recording.2024-06-20.at.11.23.51.mov

I have set all nodes to hidden by default apart from the goal, so this then gives the user to start from the goal and navigate through.

@RichGriff
Copy link
Collaborator

RichGriff commented Jun 20, 2024

The case doesnt disappear - what happens here is that the gola node is out of view, because the fitview() function isnt being used to bring it back in view when collapse/expanding child nodes. Hence, why it comes back to view when the focus button is selected.

I have reverted the chart to show all nodes by default so we have the same behaviour but set the fitView() to run when using the toggle feature.

@RichGriff
Copy link
Collaborator

Adding the fitView() function back in can be in staging immediately. However, we can discuss in print planning if you want to go in a different direction @chrisdburr (this will take some time to research)

@chrisdburr
Copy link
Collaborator Author

Looking at your video, @RichGriff, this already looks like an improvement. Happy to test when it's available in staging.

@cptanalatriste
Copy link
Collaborator

There's an approach in staging. Please check if suitable

@chrisdburr
Copy link
Collaborator Author

Adding the fitView() function back in can be in staging immediately. However, we can discuss in print planning if you want to go in a different direction @chrisdburr (this will take some time to research)

The approach in staging is improved in one respect (i.e. the case doesn't seem to disappear off screen when the goal claim is collapsed). However, the refresh on collapse/expanding and adding/removing for other elements, especially in large cases, is still creating undesirable behaviours that some of our workshop users suggested were a frustration.

For example, here we add a new element and when the case refreshes the viewport is in a different section:

issue.mp4

And, here, when we collapse/expand a branch, the case moves around to an area that is not the point of focus. Some of workshop users stopped working in the platform because of this behaviour:

issue_2.mp4

@chrisdburr
Copy link
Collaborator Author

Linking to #492, as I expect the solution to this issue will also be relevant to the other bug.

@RichGriff
Copy link
Collaborator

There are two different things here:

  • The refresh one we can look into as we may not refresh after adding the element
  • The second one, the fitView() helps when you decide the collapse the goal node, taking this away will then push the goal out of view when collapsing. The only thing we can do here is choose only to fit view when collapsing the goal. @chrisdburr would this work for you?

@chrisdburr
Copy link
Collaborator Author

Can we look at this in our sprint planning on Wednesday please? I will need to see the actual behaviours to determine the right course of action.

@RichGriff
Copy link
Collaborator

We have fixed this as part of the collapsing issue as these two are tightly linked.

The fix here was to only focus on goal element when toggling, otherwise dont focus.

This is now in staging @chrisdburr can you please review.

@chrisdburr
Copy link
Collaborator Author

Thanks. I can confirm that this is behaving appropriately now in the case of collapsing the goal claim. Will need to do more thorough testing for the wider adding/removing and expanding/collapsing of other elements with a good variety of assurance cases (e.g. small/large, simple/complex).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working improved navigation Sprint 1: Improved navigation of cases
Development

No branches or pull requests

4 participants