Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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
kittaakos merged 1 commit into main from #2354
Feb 8, 2024
Merged

fix: debug widget layout updates #2359

kittaakos merged 1 commit into main from #2354
Feb 8, 2024

Conversation

Copy link
Contributor

@kittaakos kittaakos commented Feb 8, 2024

Motivation

Fix the empty Debug widget issue in IDE2.

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 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 behavior.

Change description

Other information

Closes: #2354

Reviewer checklist

  • PR addresses a single concern.
  • The PR has no duplicates (please search among the Pull Requests before creating one)
  • PR title and description are properly filled.
  • Docs have been added / updated (for bug fixes / features)

@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
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>
Copy link
Contributor

@per1234 per1234 left a 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!

kittaakos reacted with heart emoji
@kittaakos kittaakos merged commit ca779e5 into main Feb 8, 2024
@kittaakos kittaakos deleted the #2354 branch February 8, 2024 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@per1234 per1234 per1234 approved these changes

@davegarthsimpson davegarthsimpson Awaiting requested review from davegarthsimpson

Assignees
No one assigned
Labels
topic: code Related to content of the project itself topic: debugger Related to the integrated debugger type: imperfection Perceived defect in any part of project
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Debug view blank on first debugging session of a sketch

AltStyle によって変換されたページ (->オリジナル) /