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: collapsed and expanded treeview state is preserved when saving #2096

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

smnwttbr
Copy link
Collaborator

@smnwttbr smnwttbr commented Dec 19, 2024

Description

Fix for ISXB 1164

I've removed (unused) methods related to saving the expanded state of the tree. These might have been an artifact from an earlier implementation, any any case, these were unused.

I changed the guidToId caching mechanism to use guid.GetHashCode() so that we get a deterministic guid->int mapping.

Testing status & QA

Ran local package tests.

Overall Product Risks

  • Complexity: 0
  • Halo Effect: 0

Comments to reviewers

Please describe any additional information such as what to focus on, or historical info for the reviewers.

Checklist

Before review:

  • Changelog entry added.
    • Explains the change in Changed, Fixed, Added sections.
    • For API change contains an example snippet and/or migration example.
    • JIRA ticket linked, example (case %%). If it is a private issue, just add the case ID without a link.
    • Jira port for the next release set as "Resolved".
  • Tests added/changed, if applicable.
    • Functional tests Area_CanDoX, Area_CanDoX_EvenIfYIsTheCase, Area_WhenIDoX_AndYHappens_ThisIsTheResult.
    • Performance tests.
    • Integration tests.
  • Docs for new/changed API's.
    • Xmldoc cross references are set correctly.
    • Added explanation how the API works.
    • Usage code examples added.
    • The manual is updated, if needed.

During merge:

  • Commit message for squash-merge is prefixed with one of the list:
    • NEW: ___.
    • FIX: ___.
    • DOCS: ___.
    • CHANGE: ___.
    • RELEASE: 1.1.0-preview.3.

After merge:

  • Create forward/backward port if needed. If you are blocked from creating a forward port now please add a task to ISX-1444.

Copy link
Collaborator

@ekcoh ekcoh left a comment

Choose a reason for hiding this comment

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

Look trough the code (didn't run it) and in general I must say I have love PRs that remove more lines than they add :) Not sure I fully understand how this rather compact PR solves the problem though.

Copy link
Collaborator

@ekcoh ekcoh left a comment

Choose a reason for hiding this comment

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

Code changes LGTM if it works. I noticed you have changed to a index based id it seems so would recommend covering expansion state robustness in the tests, e.g. what happens if you expand two branches and then insert a new branch between them? So just want to sort this out before approving.

ekcoh
ekcoh previously requested changes Dec 19, 2024
Copy link
Collaborator

@ekcoh ekcoh left a comment

Choose a reason for hiding this comment

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

Unfortunately UI tests are failing based on this change it seems, see CI jobs.

@smnwttbr smnwttbr marked this pull request as draft December 19, 2024 08:16
Copy link
Collaborator

@ritamerkl ritamerkl 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 recommend checking if the id's need to be consistent between rebuilds - some functionality may use the id's where the information might get lost assigning new ids.

@smnwttbr smnwttbr marked this pull request as ready for review December 20, 2024 08:55
@smnwttbr smnwttbr requested a review from ekcoh December 22, 2024 02:42
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.

3 participants