Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

DevTools should not add visual elements to its logical tree #17443

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pavelovcharov
Copy link
Contributor

@pavelovcharov pavelovcharov commented Nov 6, 2024

What does the pull request do?

This PR makes sure that the visual elements are not added to the DevTools logical tree.

What is the current behavior?

Currently in 11.2, visual elements can be added to the DevTools logical tree. This can causes the app's visual tree to break.

    <TabControl>
        <TabItem Header="Item1">
            <Button>button1</Button>
        </TabItem>
        <TabItem Header="Item2">
            <Button>button2</Button>
        </TabItem>
    </TabControl>
AvaloniaApplication5_bAxslwekDg.mp4

What is the updated/expected behavior with this PR?

How was the solution implemented (if it's not obvious)?

Checklist

Breaking changes

Obsoletions / Deprecations

Fixed issues

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.3.999-cibuild0053115-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@cla-avalonia
Copy link
Collaborator

cla-avalonia commented Nov 6, 2024

  • All contributors have signed the CLA.

@pavelovcharov
Copy link
Contributor Author

@cla-avalonia agree

@pavelovcharov pavelovcharov force-pushed the fix/devtools-break-visual-tree branch from 046dcf8 to 8e25950 Compare November 6, 2024 21:48
@maxkatz6
Copy link
Member

maxkatz6 commented Nov 6, 2024

What problem does it solve?

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.3.999-cibuild0053117-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@pavelovcharov
Copy link
Contributor Author

@maxkatz6 I've noticed a rather strange bug in v.11.2 - visual elements disappear from the visual tree after inspection with DevTools.

    <TabControl>
        <TabItem Header="Item1">
            <Button>button1</Button>
        </TabItem>
        <TabItem Header="Item2">
            <Button>button2</Button>
        </TabItem>
    </TabControl>
AvaloniaApplication5_bAxslwekDg.mp4

I think it happens because the ContentControl in the ControlDetailsView puts its content in its logical tree. So, I did this PR to make sure that I got it right.

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.3.999-cibuild0053117-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@pavelovcharov pavelovcharov force-pushed the fix/devtools-break-visual-tree branch from 8e25950 to 6bb9c29 Compare November 7, 2024 10:15
@pavelovcharov pavelovcharov marked this pull request as ready for review November 7, 2024 10:16
@pavelovcharov pavelovcharov changed the title WIP DevTools ContentControl should not add Content to its logical tree DevTools should not add visual elements to its logical tree Nov 7, 2024
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.3.999-cibuild0053127-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants