HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

gdn.meta

I just noticed this arrived in the master branch:
https://github.com/vanilla/vanilla/commit/f7d4e3743d843347bad3b13bb5c7023aa08fd774

Does this mean gdn.meta should be used instead of gdn.definition in 2.3?

What was the reason for renaming it, will it hold more than just js definitions in the future?

Comments

  • Meta just makes more sense than definition and is shorter too.

    If it is straight up renaming, I assume they will provide an alias for gdn.definition and deprecate it for future work. Much like they did with val() versus GetValue().

    If it is something separate, I would imagine some documentation coming out when it hits OS.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • ToddTodd Vanilla Staff

    I'll weigh in here since I made the change.

    I really didn't like the behaviour of gdn.definition() where the key is returned if it doesn't exist. This is really only appropriate for translations rather than data. It actually have left to a lot of typo style bugs in our internal development so I wanted to put an end to the bad behavior for our future development. I most likely would have just kept the gdn.definition() name if it had the right behavior.

    The more interesting part of this change is putting the definitions much earlier in the page which will pave the way for a lot of positive changes in the client side. Right now you can't for example construct a url until after document ready. We want to do some work so that libraries can be more easily separated from initialization scripts and come in before document ready if desired.

    Hope this makes sense.

Sign In or Register to comment.