- 
 
- 
  Notifications
 You must be signed in to change notification settings 
- Fork 512
fix: debug widget layout updates #2359
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
 
  Merged
 
 
 Conversation
 
 
 This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
 Learn more about bidirectional Unicode characters
 
 
 
 
 
 
 @kittaakos
kittaakos
 added
 
 topic: code
 Related to content of the project itself 
 
 type: imperfection
 Perceived defect in any part of project 
 
 topic: debugger
 Related to the integrated debugger 
 labels
 Feb 8, 2024 
 
  @kittaakos
 kittaakos
 force-pushed
 the
 
 
 #2354
 
 branch
 from
 February 8, 2024 11:02  
 
674f0a0 to
 8ac9009  
 Compare
 
 Use customized `PanelLayout#removeWidget` and `PanelLayout#insertWidget` logic for the layout updates. The customized functions ensure no side effect if adding/removing the widget to/from the layout but it's already present/absent. Unlike the default [`PanelLayout#removeWidget`](https://github.com/phosphorjs/phosphor/blob/9f5e11025b62d2c4a6fb59e2681ae1ed323dcde4/packages/widgets/src/panellayout.ts#L154-L156) behavior, do not try to remove the widget if it's not present (has a negative index). Otherwise, required widgets might be removed based on the default [`ArrayExt#removeAt`](https://github.com/phosphorjs/phosphor/blob/9f5e11025b62d2c4a6fb59e2681ae1ed323dcde4/packages/algorithm/src/array.ts#L1075-L1077) behavior. Closes: #2354 Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
 @kittaakos
 kittaakos
 force-pushed
 the
 
 
 #2354
 
 branch
 from
 February 8, 2024 11:26  
 
8ac9009 to
 7384f1b  
 Compare
 
 
 per1234
 
  
 
 
 per1234
 
 
 approved these changes
 
 
 Feb 8, 2024 
 
 
 
 
 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I verified this fixes #2354
Thanks Akos!
 
 Sign up for free
 to join this conversation on GitHub.
 Already have an account?
 Sign in to comment
 
 
 Add this suggestion to a batch that can be applied as a single commit.
 This suggestion is invalid because no changes were made to the code.
 Suggestions cannot be applied while the pull request is closed.
 Suggestions cannot be applied while viewing a subset of changes.
 Only one suggestion per line can be applied in a batch.
 Add this suggestion to a batch that can be applied as a single commit.
 Applying suggestions on deleted lines is not supported.
 You must change the existing code in this line in order to create a valid suggestion.
 Outdated suggestions cannot be applied.
 This suggestion has been applied or marked resolved.
 Suggestions cannot be applied from pending reviews.
 Suggestions cannot be applied on multi-line comments.
 Suggestions cannot be applied while the pull request is queued to merge.
 Suggestion cannot be applied right now. Please check back later.
 
 
 
 
Motivation
Fix the empty Debug widget issue in IDE2.
Use customized
PanelLayout#removeWidgetandPanelLayout#insertWidgetlogic for the layoutupdates. The customized functions ensure no side
effect if adding/removing the widget to/from the
layout but it's already present/absent.
Unlike the default
PanelLayout#removeWidgetbehavior,do not try to remove the widget if it's
not present (has a negative index). Otherwise,
required widgets might be removed based on the
default
ArrayExt#removeAtbehavior.Change description
Other information
Closes: #2354
Reviewer checklist