https://linen.dev logo
Join Discord
Powered by
# haxe-ui
  • a

    ambitious-knife-25690

    03/04/2023, 1:15 PM
    that was my next question heh
  • r

    refined-laptop-39041

    03/04/2023, 1:19 PM
    Oh wow, that was fast. I'll try it out, thanks!
  • b

    bright-gpu-74537

    03/04/2023, 1:19 PM
    cool - let me know if you have issues... CI passes so i think its all fine
  • a

    ambitious-knife-25690

    03/04/2023, 1:35 PM
    it fails on the removal of the last added component
  • a

    ambitious-knife-25690

    03/04/2023, 1:35 PM
    it leaves a "part" of the full component behind
  • a

    ambitious-knife-25690

    03/04/2023, 1:35 PM
    like it will remove the text but leave the bg
  • b

    bright-gpu-74537

    03/04/2023, 1:36 PM
    ¯\_(ツ)_/¯
  • a

    ambitious-knife-25690

    03/04/2023, 1:36 PM
    oh, hmm....
  • b

    billowy-waiter-28954

    03/04/2023, 2:37 PM
    Visuals are sorted by depth, so the order in
    children
    shouldn't matter. Why would you need to do that?
  • b

    bright-gpu-74537

    03/04/2023, 2:39 PM
    is the depth order "per parent"? I mean, this for example:
  • b

    bright-gpu-74537

    03/04/2023, 2:39 PM
    Copy code
    A (depth = 1)
        B (depth = 1)
        C (depth = 2)
            X (depth = 1)
            Y (depth = 2)
            Z (depth = 3)
        D (depth = 3)
  • b

    bright-gpu-74537

    03/04/2023, 2:40 PM
    are those depths sensible? Or would it be 1, 2, 3, 4, 5, 6, 7, etc
  • b

    billowy-waiter-28954

    03/04/2023, 2:50 PM
    Yes it's per parent by default (although that can be changed with the
    depthRange
    property)
  • b

    bright-gpu-74537

    03/04/2023, 3:02 PM
    great, so yeah, its all as discussed then NotBilly
  • b

    bright-gpu-74537

    03/04/2023, 3:03 PM
    Jeremy: for your understanding, in haxeui, the position of the child in the children array is effectively its zorder
  • b

    billowy-waiter-28954

    03/04/2023, 3:12 PM
    Yes, that's fine, as long as it is translated correctly into depth values for Ceramic (which is fairly easy to do, like in the code you shared above)
  • b

    bright-gpu-74537

    03/04/2023, 3:13 PM
    yeah, its all pretty trivial, just need to align the depth with the index... no biggie... just wasnt sure how far you had scrolled 🙂
  • a

    ambitious-knife-25690

    03/04/2023, 3:14 PM
    I've got the indexes aligned but I'm having a weird issue where only the first added button is improperly being removed
  • b

    bright-gpu-74537

    03/04/2023, 3:14 PM
    is the GH code up to date?
  • a

    ambitious-knife-25690

    03/04/2023, 3:17 PM
    2 secs i can push
  • a

    ambitious-knife-25690

    03/04/2023, 3:18 PM
    @bright-gpu-74537
  • b

    bright-gpu-74537

    03/04/2023, 3:21 PM
    i dont quite get this impl: https://github.com/Jarrio/haxeui-ceramic/blob/master/haxe/ui/backend/ComponentImpl.hx#L205-L226 Why not just do:
    Copy code
    haxe
    private override function handleRemoveComponentAt(index:Int, dispose:Bool = true):Component {
        return this.handleRemoveComponent(this.childComponents[index], dispose);
    }
  • b

    bright-gpu-74537

    03/04/2023, 3:24 PM
    you can also replace: https://github.com/Jarrio/haxeui-ceramic/blob/master/haxe/ui/backend/ComponentImpl.hx#L181-L191 with:
    Copy code
    haxe
    private override function handleAddComponentAt(child:Component, index:Int):Component {
        return this.handleAddComponent(child);
    }
    Since you dont really care about the index (depth), you'll assign them later in mapChildren
  • a

    ambitious-knife-25690

    03/04/2023, 3:24 PM
    huh, that is way smarter
  • a

    ambitious-knife-25690

    03/04/2023, 3:26 PM
    yep, looks like it was my bad code that caused the issue
  • a

    ambitious-knife-25690

    03/04/2023, 3:26 PM
    over engineered 😅
  • b

    bright-gpu-74537

    03/04/2023, 3:27 PM
    🙂 so that works now? How does your "everything is fucked" test case look now?
  • a

    ambitious-knife-25690

    03/04/2023, 3:27 PM
    this is the first time i've seen notifications properly overlap that line
  • b

    bright-gpu-74537

    03/04/2023, 3:28 PM
    🥳 So menus will also work now... as i suspected, the issue was your "layering" of components
  • a

    ambitious-knife-25690

    03/04/2023, 3:28 PM
    i still can't select an item on a list view
1...157115721573...1687Latest