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

    bright-gpu-74537

    05/20/2023, 1:43 PM
    open to suggestions (naming stuff is crappy)
  • b

    bright-gpu-74537

    05/20/2023, 1:44 PM

    https://cdn.discordapp.com/attachments/565569107701923852/1109476708249260093/image.png▾

  • b

    bright-gpu-74537

    05/20/2023, 1:49 PM
    Copy code
    xml
            <popup-panel width="100">
                <listview>
                    <data>
                        <item text="Item 1" />
                        <item text="Item 2" />
                        <item text="Item 3" />
                        <item text="Item 4" />
                    </data>
                </listview>
            </popup-panel>
    
            <list-popup width="100">
                <data>
                    <item text="Item 1" />
                    <item text="Item 2" />
                    <item text="Item 3" />
                    <item text="Item 4" />
                </data>
            </list-popup>
    
            <popup-panel width="150" panelSelectionEvent="menuselected">
                <menu>
                    <menu-item text="Item 1" />
                    <menu-item text="Item 2" />
                    <menu-item text="Item 3" />
                    <menu-separator />
                    <menu text="Menu A">
                        <menu-item text="Item 1A" />
                        <menu-item text="Item 2A" />
                        <menu-item text="Item 3A" />
                    </menu>
                    <menu-separator />
                    <menu-item text="Item 4" />
                    <menu-item text="Item 5" />
                    <menu-item text="Item 6" />
                </menu>
            </popup-panel>
    
            <number-popup width="100" />
  • b

    bright-gpu-74537

    05/20/2023, 1:52 PM
    (the rationale, btw, is that dropdown is trying to be way too many things, and i frequently abuse it to fake other types of controls - like a MenuDropdown)
  • b

    bright-gpu-74537

    05/20/2023, 1:54 PM
    menudropown eg (its super hacky and a total abuse of the actual component):
  • b

    bright-gpu-74537

    05/20/2023, 1:54 PM

    https://cdn.discordapp.com/attachments/565569107701923852/1109479218737319977/image.png▾

  • a

    ambitious-knife-25690

    05/20/2023, 2:06 PM
    i'd say hard no to popup because that is a already assigned to a different expected behaviour
  • b

    bright-gpu-74537

    05/20/2023, 2:06 PM
    is it?
  • a

    ambitious-knife-25690

    05/20/2023, 2:06 PM
    pop up implies a "window" or "alert" kind of thing
  • b

    bright-gpu-74537

    05/20/2023, 2:07 PM
    true, thats what i keep going back and forth on
  • a

    ambitious-knife-25690

    05/20/2023, 2:07 PM
    what's wrong with, at least for now, dropdownpanel?
  • b

    bright-gpu-74537

    05/20/2023, 2:07 PM
    "selector" is something i thought about, but not sure it make sense
  • b

    bright-gpu-74537

    05/20/2023, 2:08 PM
    dropdownpanel is alright i guess... probably better than popup for sure
  • b

    bright-gpu-74537

    05/20/2023, 2:08 PM
    i was trying to avoid "dropdown" altogether tbh
  • b

    bright-gpu-74537

    05/20/2023, 2:09 PM
    what about like "MenuSelector", "ColourSelector", "NumberSelector", "ListItemSelector", etc?
  • a

    ambitious-knife-25690

    05/20/2023, 2:09 PM
    i'd say there's no need to reference it with components built on it - like
    ColorSelectorPopup
    can just be
    ColorSelector
    or
    ColorPicker
  • b

    bright-gpu-74537

    05/20/2023, 2:10 PM
    true, but the idea is also that you could build your own, with relative ease, so the naming of the core class(es) is important
  • a

    ambitious-knife-25690

    05/20/2023, 2:10 PM
    if i understand it right, DropdownPanel seems more like a "lower level" way to interact with things
  • b

    bright-gpu-74537

    05/20/2023, 2:11 PM
    core one here i guess would be "ItemSelector"
  • b

    bright-gpu-74537

    05/20/2023, 2:11 PM
    well, dropdownpanel would basically be a dropdown... the "panel" there would be a listview
  • b

    bright-gpu-74537

    05/20/2023, 2:12 PM
    and the renderer would be a normal item renderer and the trigger would be the whole component
  • a

    ambitious-knife-25690

    05/20/2023, 2:13 PM
    right so "core" would have dropdownpanel but you would build a
    ListPicker
    or
    Dropdown
    (conventional names i think) on top of the DropDownPanel
  • b

    bright-gpu-74537

    05/20/2023, 2:13 PM
    no, core would have like an "ItemSelector" (or ItemPicker)... currently called "PopupPanel", and other "pickers" would be based around that
  • a

    ambitious-knife-25690

    05/20/2023, 2:15 PM
    hmm, i think dropdown seems like the "best" then
  • b

    bright-gpu-74537

    05/20/2023, 2:15 PM
    like: ListItemPicker, ColorSelector, MenuItemSelector, etc
  • b

    bright-gpu-74537

    05/20/2023, 2:16 PM
    but what about like, for instance a "combo box" (ie, list view being the "panel", textfield being the "renderer" and a dropdown arrow icon / button being the "trigger")
  • b

    bright-gpu-74537

    05/20/2023, 2:17 PM

    https://cdn.discordapp.com/attachments/565569107701923852/1109485001231310898/image.png▾

  • b

    bright-gpu-74537

    05/20/2023, 2:17 PM
    kinda like that (but a textfield and not a number stepper)
  • b

    bright-gpu-74537

    05/20/2023, 2:17 PM
    StringDropDown?
  • b

    bright-gpu-74537

    05/20/2023, 2:18 PM
    EditableStringDropDown?
1...167816791680...1687Latest