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

[OneExplorer] Targeted refresh on Change/Delete #1710

Merged
merged 1 commit into from
Oct 23, 2023

Conversation

dayo09
Copy link
Contributor

@dayo09 dayo09 commented Oct 17, 2023

This commit refreshs only the required nodes on change and delete file.

ONE-vscode-DCO-1.0-Signed-off-by: Dayoung Lee [email protected]


For #1422 #1501

@dayo09 dayo09 changed the title [OneExplorer] Targetted refresh on Change/Delete [OneExplorer] Targeted refresh on Change/Delete Oct 17, 2023
@dayo09 dayo09 requested a review from a team October 17, 2023 06:28
@dayo09 dayo09 added the 2 approvals 2 approvals required to be merged label Oct 17, 2023
This commit refreshs only the required nodes on change and delete file.

ONE-vscode-DCO-1.0-Signed-off-by: Dayoung Lee <[email protected]>
@jyoungyun
Copy link
Collaborator

I can't fully understand your code at once. Could you explain the change you made in this PR? :)

@dayo09
Copy link
Contributor Author

dayo09 commented Oct 18, 2023

@jyoungyun Sure :-D

Do you remember that the explorer flickers and folds all the nodes whenever there are file changes?
It's because it currently rebuilds all the nodes on file change event.
Now, it's improved to build the related nodes.
With this draft, you can see that it doesn't flicker anymore when you save cfg or delete some model files.

(1) On Cfg file change:

  • it rebuilds the related model nodes.
    • parent node: if any parent node(base model) is added / removed, OneStorage updates the 'base model to cfg' map and 'base model node' infomation. and the nodes are rebuild
    • child node: if any child node (circle, log, etc... a.k.a products) is added / removed, OneStorage updates the 'cfg object' map and 'cfg node' information and 'product node'.

(2) On Product(circle/tvn/log, ...) delete:

  • it rebuilds the related cfg node.
    • NOTE that multiple product nodes can be shown under multiple cfg file.
      • we need to find all the related cfg nodes and update the information ('cfg object' map and 'cfg node' information and 'product node')

It's all for change/delete. I am working on 'create' event.

@jyoungyun
Copy link
Collaborator

Does this have nothing to do with folding whenever there is a file change? Because when I tested this PR, if I build cfg and create a new product file, it still folds. I thought this change is related to the folding issue. :)

@dayo09
Copy link
Contributor Author

dayo09 commented Oct 19, 2023

@jyoungyun

It's all for change/delete. I am working on 'create' event.

On creation, I am working on it! :-D

Copy link
Collaborator

@jyoungyun jyoungyun left a comment

Choose a reason for hiding this comment

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

LGTM

@dayo09 dayo09 requested a review from a team October 19, 2023 09:49
Copy link
Contributor

@hseok-oh hseok-oh left a comment

Choose a reason for hiding this comment

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

LGTM

@jyoungyun jyoungyun merged commit 782d377 into Samsung:main Oct 23, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 approvals 2 approvals required to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants