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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loaded scripts identation broken once second program starts #55448

Closed
isidorn opened this issue Jul 31, 2018 · 7 comments
Closed

Loaded scripts identation broken once second program starts #55448

isidorn opened this issue Jul 31, 2018 · 7 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Milestone

Comments

@isidorn
Copy link
Contributor

isidorn commented Jul 31, 2018

Refs: #54921

  1. Start debugging a first program, loaded scripts shows up and all is good
  2. Start debugging a second program, loaded scripts has broken identation (too much to the left) 馃悰
  3. Notice that if I expand / collapse some nodes the indentation gets fixed

screen shot 2018-07-31 at 12 00 13

@isidorn isidorn added bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues labels Jul 31, 2018
@weinand weinand assigned joaomoreno and unassigned weinand Jul 31, 2018
@weinand
Copy link
Contributor

weinand commented Jul 31, 2018

that's a tree layout issue.

@isidorn
Copy link
Contributor Author

isidorn commented Jul 31, 2018

@weinand None of the other trees are exibithing this behavior - and some do a very similar rendering to you, example Call Stack.
I suggest you look into this and check what is differnet between CallStack and Loaded Scripts before forwarding to Joao who does not fix tree bugs to my understanding.

@joaomoreno joaomoreno assigned sandy081 and unassigned joaomoreno Aug 2, 2018
@weinand
Copy link
Contributor

weinand commented Aug 3, 2018

The loaded scripts view is no longer extension code, so this is a native tree issue.
I'll investigate whether I can work around this.

@weinand weinand assigned weinand and unassigned sandy081 Aug 3, 2018
@weinand weinand added this to the August 2018 milestone Aug 3, 2018
@joaomoreno
Copy link
Member

joaomoreno commented Aug 3, 2018

@weinand Interesting! Let me know if you come up with any insights.

@weinand
Copy link
Contributor

weinand commented Aug 14, 2018

@joaomoreno I've investigated this and found the following:
the layout gets broken if elements are reparented without changing their ID.

So assigning unique IDs to tree elements once, prevents that they can be reparented successfully later.
Changing my code to calculate IDs dynamically based on their parent chain fixed the problem.

In my case the the IDataSource of the initial tree was this (IDs in parenthesis):

Root (1)
   Source1 (3)
   Source2 (4)

the reparenting introduces a new intermediate "Session1" node (because another session 2 made this necessary):

Root (1)
   Session1 (2)
      Source11 (3)
      Source12 (4)
   Session2 (5)
      Source21 (6)
      Source22 (7)

The visual appearance with the broken layout) was this:

> Session1 (2)
Source11 (3)
Source12 (4)
> Session2 (5)
    Source21 (6)
    Source22 (7)

It looks like the indent of the elements Source11 and Source12 is not adjusted because they exist already in the tree.

Is this a bug or is there a constraint on tree element IDs?

@joaomoreno
Copy link
Member

馃

It could very well be an unintended constraint... I'm glad you found a way around it!

@weinand
Copy link
Contributor

weinand commented Aug 16, 2018

It would be helpful if you could add this constraint as a comment to the DataProvider interface.

@isidorn isidorn added the verified Verification succeeded label Aug 28, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Sep 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants