https://htmx.org logo
Join Discord
Powered by
# htmx-general
  • f

    freezing-waitress-26396

    11/16/2022, 6:30 PM
    https://tenor.com/view/come-to-me-dr-evil-sad-come-here-gif-5275332
  • r

    refined-waiter-90422

    11/16/2022, 6:30 PM
    Yeah just follow my github aha. I'll be sure to make an announcement on the PHP channel as well if it does happen.
  • f

    freezing-waitress-26396

    11/16/2022, 6:31 PM
    Thanks!
  • r

    refined-waiter-90422

    11/16/2022, 6:33 PM
    I will admit it would be cool/hilarious for it to get initial adoption here of all places.
  • w

    witty-daybreak-45092

    11/16/2022, 6:36 PM
    https://gist.github.com/itsthejoker/88cbfab093bf9ad4150d47e20d1a81cb This is designed to take in either class-style objects or dictionaries. Documentation is in the function.
  • r

    refined-waiter-90422

    11/16/2022, 6:37 PM
    ⬆️ why python needs null coalescing. aha. Thanks.
  • w

    witty-daybreak-45092

    11/16/2022, 6:38 PM
    lol I definitely agree
  • w

    witty-daybreak-45092

    11/16/2022, 6:39 PM
    oh actually lemme edit that a little
  • g

    green-activity-6102

    11/16/2022, 6:43 PM
    that code is only so complex because you're doing with object/dot-syntax -- if you wanted to use dictionaries like the PHP example above it's much simpler -- 2 lines of code:
    Copy code
    >>> from collections import defaultdict
    >>> def rec_dd():
    ...     return defaultdict(rec_dd)
    ... 
    >>> data = rec_dd()                                                
    >>> bool(data['this']['key']['doesnt']['exist'])
    False
  • w

    witty-daybreak-45092

    11/16/2022, 6:43 PM
    done
  • w

    witty-daybreak-45092

    11/16/2022, 6:43 PM
    totally
  • w

    witty-daybreak-45092

    11/16/2022, 6:44 PM
    this is pulled from one of the codebases I work on (with permission) -- it serves both Mongo documents (just horribly abused classes) and dicts
  • r

    refined-waiter-90422

    11/16/2022, 6:46 PM
    👀 uh...
  • w

    witty-daybreak-45092

    11/16/2022, 6:47 PM
    oop
  • g

    green-activity-6102

    11/16/2022, 6:49 PM
    HA
  • g

    green-activity-6102

    11/16/2022, 6:49 PM
    okay yeah i didnt think of that...
  • g

    green-activity-6102

    11/16/2022, 6:49 PM
    cuz technically what this does is it initializes a new empty dict at each layer
  • r

    refined-waiter-90422

    11/16/2022, 6:49 PM
    I'll admit it had me excited
  • g

    green-activity-6102

    11/16/2022, 6:49 PM
    and if you go deeper then the new dict will have a key in it (no longer empty/falsey)
  • a

    ancient-shoe-86801

    11/16/2022, 7:12 PM
    https://indieweb.social/@addyosmani/109354381622186372
  • a

    ancient-shoe-86801

    11/16/2022, 7:13 PM
    View transitions seem another nice tool to have in the belt for MPAs
  • r

    refined-waiter-90422

    11/16/2022, 7:13 PM
    Yeah they aren't out yet but can't wait.
  • r

    refined-waiter-90422

    11/16/2022, 7:14 PM
    might be the nail in the coffin for most future react projects tbh.
  • m

    mysterious-toddler-20573

    11/16/2022, 7:18 PM
    I wish they would integrate DOM merging into the browser
  • m

    mysterious-toddler-20573

    11/16/2022, 7:18 PM
    that's where it belongs
  • m

    mysterious-toddler-20573

    11/16/2022, 7:18 PM
    dumb to do it out in JavaScript land
  • m

    mysterious-toddler-20573

    11/16/2022, 7:20 PM
    maybe let html issue
    PUT
    ,
    PATCH
    and
    DELETE
    first tho
  • f

    freezing-waitress-26396

    11/16/2022, 7:20 PM
    I wish
  • f

    freezing-waitress-26396

    11/16/2022, 7:22 PM
    Could do view transition in htmx with hyperscript tbh. Append content, do animation, detatch previous content 😬
  • m

    mysterious-toddler-20573

    11/16/2022, 7:24 PM
    🙂
1...912913914...1146Latest