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

[.NET9] Look at fixing the order that we process OnChildAdded as it relates to the handlers #23409

Open
PureWeen opened this issue Jul 2, 2024 · 0 comments
Labels
area-controls-general General issues that span multiple controls, or common base classes such as View or Element s/triaged Issue has been reviewed t/bug Something isn't working

Comments

@PureWeen
Copy link
Member

PureWeen commented Jul 2, 2024

Description

Currently with layouts the flow of operations will go (Similar steps for OnApp)

  • Remove view
  • Removed from logical view
  • OnChildRemoved is called
    public void RemoveAt(int index)
    {
    if (index >= Count)
    {
    return;
    }
    var child = _children[index];
    _children.RemoveAt(index);
    if (child is Element element)
    {
    RemoveLogicalChild(element);
    }
    OnRemove(index, child);
    }
  • xplat events fire
  • handler processes remove

I think those last two steps should be flipped.
Once our code has finished processing the remove then we should fire all the eventing paths that are going on inside of OnChildRemoved

Related work here
#23408

@PureWeen PureWeen added the area-controls-general General issues that span multiple controls, or common base classes such as View or Element label Jul 2, 2024
@PureWeen PureWeen added this to the .NET 9 Planning milestone Jul 2, 2024
@dotnet-policy-service dotnet-policy-service bot added the s/triaged Issue has been reviewed label Jul 2, 2024
@samhouts samhouts removed the s/triaged Issue has been reviewed label Jul 3, 2024
@samhouts samhouts added the s/triaged Issue has been reviewed label Jul 10, 2024
@samhouts samhouts added the t/bug Something isn't working label Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-general General issues that span multiple controls, or common base classes such as View or Element s/triaged Issue has been reviewed t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants