Permalink
Switch branches/tags
Nothing to show
Commits on Jul 3, 2014
  1. Modernize `.arclint` file

    joshuaspence committed Jul 2, 2014
    Summary:
    Modernize the `.arclint` file. Specifically:
    
    - Add a (native) JSON linter (see D9628)
    - Add `xhpast.php-version` and `xhpast.php-version.windows` configuration (see D9576)
    - Sort `.arclint` linters alpahbetically
    
    Test Plan: N/A
    
    Reviewers: epriestley, #blessed_reviewers
    
    Reviewed By: epriestley, #blessed_reviewers
    
    Subscribers: epriestley, Korvin
    
    Differential Revision: https://secure.phabricator.com/D9801
Commits on Jun 10, 2014
  1. Modernize `.arcconfig`.

    joshuaspence committed with epriestley Jun 10, 2014
    Summary: There have been several changes to the `.arcconfig` file format since this repository was last updated. In addition, the `PhutilLintEngine` no longer exists.
    
    Test Plan: Eyeball it.
    
    Reviewers: #blessed_reviewers, epriestley
    
    Reviewed By: #blessed_reviewers, epriestley
    
    Subscribers: epriestley, Korvin
    
    Differential Revision: https://secure.phabricator.com/D9445
  2. Apply linter fixes

    joshuaspence committed with epriestley Jun 10, 2014
    Summary: Apply various linter fixes.
    
    Test Plan: Eyeballed it.
    
    Reviewers: chad, epriestley, #blessed_reviewers
    
    Reviewed By: epriestley, #blessed_reviewers
    
    Subscribers: epriestley, Korvin
    
    Differential Revision: https://secure.phabricator.com/D9449
  3. Fix `libfbjs`.

    joshuaspence committed with epriestley Jun 10, 2014
    Summary:
    Currently, I am unable to build `libfbjs`. More specifically, I get the following error:
    
    ```
    g++  -fPIC -Wall -DNOT_FBMAKE=1 -ggdb -g -O0 -DDEBUG  -c -o parser.yacc.o parser.yacc.cpp
    In file included from parser.hpp:35:0,
                     from parser.yy:23:
    parser.yacc.hpp:186:31: error: ‘Node’ has not been declared
     int yyparse (void* yyscanner, Node* root);
                                   ^
    make: *** [parser.yacc.o] Error 1
    ```
    
    It seems that the issue is that in the generated `parser.yacc.hpp`, `Node` isn't fully qualified with the correct namespace (i.e. `libfbjs::Node`). Comparing `parser.y` from `libfbjs` with the same file from `xhpast`, it seems that the namespace is missing from `libfbjs`.
    
    Test Plan: After this change, I am able to build `libfbjs` using `make`.
    
    Reviewers: #blessed_reviewers, epriestley
    
    Subscribers: epriestley, Korvin
    
    Differential Revision: https://secure.phabricator.com/D9446
Commits on Mar 6, 2014
Commits on Jul 12, 2013
  1. Fix typo in comment

    vrana committed Jul 12, 2013
Commits on May 6, 2013
  1. Fix a Javelin bug with URI parsing for URIs like "/?&x"

    epriestley committed May 6, 2013
    Summary:
    Currently, JX.URI fails to make progress while parsing URIs in the form `/?&x`, and loops infinitely instead. This is because the regexp used to parse the query parameters may match the empty string at the beginning of the query string, and continue matching it forever.
    
    Instead, use a more straightforward split/join approach which can't loop.
    
    Test Plan: Added failing (well, infinitely looping) tests; fixed them.
    
    Reviewers: btrahan
    
    Reviewed By: btrahan
    
    CC: aran
    
    Differential Revision: https://secure.phabricator.com/D5832
Commits on Apr 24, 2013
  1. Update prebuilt packages.

    epriestley committed Apr 24, 2013
Commits on Apr 17, 2013
  1. Vector - fix Vector.getPos() to handle crazier elements

    bobtrahan committed with epriestley Apr 17, 2013
    Summary: the conpherence application provides a great example. See D5719.
    
    Test Plan: D5719
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D5720
Commits on Apr 5, 2013
  1. Sync standalone Javelin with Phabricator Javelin

    epriestley committed Apr 5, 2013
    Summary: We stopped submoduling this a while ago, backport some fixes into the standalone Javelin.
    
    Test Plan: See inlines.
    
    Reviewers: btrahan, krugerke
    
    CC: tomo, alpjor, hedger, CatChen, aran
    
    Differential Revision: https://secure.phabricator.com/D5564
Commits on Feb 15, 2013
  1. Prevent Looping when JX.Resource callbacks throw errors

    alpjor committed Feb 15, 2013
    Summary: When these two callsites of JX.Resource have callbacks that throw exceptions, we never change the state of the links variable and each time that _poll gets called, we run into the error again and again in a loop
    
    Test Plan:
       JX.Resource.load([valid CSS resource that is not already loaded], function() { throw new Error('looper'); });
    
    Reviewers: epriestley, hedger, CatChen
    
    CC: aran, Korvin, piaw.na
    
    Differential Revision: https://secure.phabricator.com/D4976
Commits on Jan 10, 2013
  1. Handle special characters in JSON eval()

    vrana committed Jan 10, 2013
    Summary: See https://medium.com/joys-of-javascript/42a28471221d.
    
    Test Plan:
      lang=js
      eval('({"str": "own\u2028ed"})');
      eval('({"str": "own\u2028ed"})'.replace(/\u2028/g, '\\u2028').replace(/\u2029/g, '\\u2029'));
    
    Reviewers: epriestley
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D4385
Commits on Dec 23, 2012
  1. JX.Resource: normalize paths

    jwatzman committed with epriestley Dec 23, 2012
    Summary:
    Be consistent between browser munging on bootstrap and munging when
    given a path via JX.Resource.load. See comment in code and T2234 for details.
    
    Fixes T2234.
    
    Test Plan:
    Load a page with CSS and JS resources specified with URIs that did
    not include hostnames. See that `JX.Resource._loaded` does include hostnames.
    Re-load one of those resources via `JX.Resource.load(path-without-hostname,
    JX.bag)`. See that the resource is no longer re-loaded; its name is properly
    normalized. Load a resource that is not already on the page, see it get loaded.
    See normalization work in both Firefox and Chrome.
    
    Reviewers: epriestley, chad, cpojer
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Maniphest Tasks: T2234
    
    Differential Revision: https://secure.phabricator.com/D4279
Commits on Dec 21, 2012
  1. Add JX.DOM.invoke

    epriestley committed Dec 21, 2012
    Summary:
    Enables dispatching of custom events, which bubble up like native DOM events.
    
    This could be useful for something like a "success" event on async form
    submissions, where some behavior is firing a JX.Request automatically (e.g.
    Workflow) and you want to register a callback without having access to the
    request.
    
    Another potential use case: given a listener for "change" events on
    forms (to enable/disable the submit button, perhaps), this would let you invoke
    a "change" event on pseudo-controls like typeaheads. Note that you can't
    actually invoke a "change" event because that's a reserved native event name,
    but your form listener would only have to listen for "change" and "mychange",
    and it would only be notified if the typeahead that changed was inside the form
    you're listening to.
    
    Test Plan:
    tweaked example/simple.html:
    
      var p = $0 (paragraph tag)
      JX.DOM.listen(p, 'custom', null, function(event) { console.log(event); });
      JX.DOM.invoke(p, 'custom');
      => event.getNodes(), event.getType(), event.getTarget() all work
      JX.DOM.invoke(p, 'custom', { foo: 'bar' });
      => event.getData() works too
      JX.DOM.invoke(p, 'click')
      => Error ("JX.DOM.invoke(...): you cannot invoke with the same type as native events")
    
    Reviewers: tomo, cpojer, aran, mroch, btrahan, vrana
    
    Reviewed By: btrahan
    
    CC: cpojer, aran, guangyuc, mroch, epriestley, chongxiehk
    
    Maniphest Tasks: T2104
    
    Differential Revision: https://secure.phabricator.com/D665
Commits on Nov 22, 2012
  1. Add JX.Event.isNormalClick()

    epriestley committed Nov 22, 2012
    Summary:
    We either partially hard-code this logic or don't handle it correctly in several places. Generally, clicks with modifier keys or non-left clicks should not trigger most UI click actions. Make it easy to test for normal left clicks.
    
    This is consistent with what jQuery does:
    
      // Add which for click: 1 === left; 2 === middle; 3 === right
      // Note: button is not normalized, so don't use it
      if ( !event.which && button !== undefined ) {
      	event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
      }
    
    Quirksmode also seems to still be relevant:
    
    http://www.quirksmode.org/js/events_properties.html
    
    Test Plan: See next diff; made various clicks with various buttons in various browsers.
    
    Reviewers: vrana, chad, btrahan
    
    Reviewed By: vrana
    
    CC: paulshen, aran
    
    Differential Revision: https://secure.phabricator.com/D4019
Commits on Nov 21, 2012
  1. Allow JX.Request to load resources in responses

    epriestley committed Nov 21, 2012
    Summary:
    Currently, Javelin has no builtin support for loading CSS/JS before handling a response. Add some, since JX.Resource already exists and we're making forrays into this stuff in Phabricator.
    
    This applies only to 'Javelin'-format responses.
    
    Test Plan: See next diff: made Celerity emit resource URIs in ajax responses in Phabricator, verified resources were loaded before responses were processed.
    
    Reviewers: vrana, chad, btrahan
    
    Reviewed By: chad
    
    CC: paulshen, tomo, aran
    
    Maniphest Tasks: T2086
    
    Differential Revision: https://secure.phabricator.com/D4003
Commits on Oct 24, 2012
  1. Remove deprecated setFile() / getFile() from JX.Request

    epriestley committed Oct 24, 2012
    Summary: I'll hold this for a bit just in case anyone in the wild is using Javelin to handle drag-and-drop uploads, but it sounds like we're clear in both Phabricator and Facebook. See D3727, D3769.
    
    Test Plan: What could go wrong?
    
    Reviewers: paulshen, mnml0
    
    Reviewed By: mnml0
    
    CC: aran
    
    Differential Revision: https://secure.phabricator.com/D3770
Commits on Oct 23, 2012
  1. JX.Mask: Make fixed position, sigilized, and classable

    epriestley committed Oct 23, 2012
    Summary:
      - Make JX.Mask rely on "position: fixed" instead of "position: absolute" plus JX.$V plus document resize events. This fixes masks which do not resize properly when the window is resized.
      - Make JX.Mask have a "jx-mask" sigil on the element. This allows callers to listen for mask clicks to, e.g., close a lightbox.
      - Make JX.Mask take an optional class, so you can have multiple different mask styles.
    
    NOTE: This breaks masks in any browser which does not support "position: fixed;", and requires mask rules be updated from "position: absolute" to "position: fixed". I assume Facebook isn't using JX.Mask so this isn't actually an issue, but let me know if you need more of a migration path.
    
    Test Plan: Will use in next diff.
    
    Reviewers: btrahan, vrana
    
    Reviewed By: btrahan
    
    CC: paulshen, aran
    
    Differential Revision: https://secure.phabricator.com/D3797
Commits on Oct 18, 2012
  1. JX.Request: Allow raw data + data uploads

    paulshen committed Oct 18, 2012
    Summary:
    After D2384, it seems like we should allow raw data uploads + data
    (since magic parameters like __ajax__ and __metablock__ are now being
    sent as part of the GET query string.
    
    Test Plan:
    on the FB code base, send FormData as raw data on JX.Request and see
    that the request works. FB code base calls addData on every JX.Request
    that is sent so any request with raw data would throw previously.
    
    Reviewers: epriestley, vrana
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D3734
  2. JX.Request: Fix bug from D3727

    paulshen committed Oct 18, 2012
    Summary:
    Missed this caller when renaming file to rawData.
    
    grep for callers..
    https://secure.phabricator.com/P576
    
    Test Plan:
    test JX.Request on open source Javelin (not Facebook Javelin)
    make a POST request
    
    Reviewers: epriestley, yungsters
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D3733
Commits on Oct 17, 2012
  1. JX.Request: Support raw data instead of file

    paulshen committed Oct 17, 2012
    Summary:
    http://www.w3.org/TR/XMLHttpRequest2/#the-send-method
    
    The XMLHttpRequest spec allows ##send## to take any of the following:
    - ArrayBuffer
    - Blob
    - Document
    - string
    - FormData
    
    For example, using FormData allows the caller to send files along with
    data. This ends up being a straight rename of the property and
    deprecating the file property.
    
    Test Plan:
      var request = new JX.Request('someurl', function() { debugger; });
      var formData = new FormData();
      formData.append('foo', 'bar');
      request
        .setRawData(formData)
        .send();
    
    See that formData is sent as part of the request. (check in web inspector)
    
    Reviewers: epriestley, yungsters, tomo
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D3727
Commits on Oct 15, 2012
  1. Remove JX.DOM.listen reliance on DOM ID

    paulshen committed Oct 15, 2012
    Summary:
    Currently,
    
      <div id="foo">...</div>
    
      // foo is a reference to the DOM node
      JX.DOM.listen(foo, 'click', [], listener);
    
      foo.id = null; // makes listener not work
    
    JX.DOM.listen relies on the DOM ID, which leads to issues when you
    change the DOM node ID or have another DOM node with the same ID
    (possible if you swap nodes)
    
    Remove reliance on DOM ID and instead set another hidden attribute
    (data-autoid) which is used in Stratcom
    
    Test Plan:
      <div id="foo">foo</div>
    
      var foo = JX.$('foo');
      JX.DOM.listen(foo, 'click', [], function() { debugger; });
    
      // click and see listener is fired
      foo.id = null;
    
      // click and see listener is still fired. not fired before diff
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D3704
Commits on Oct 12, 2012
  1. Add a removeToken method to Tokenizer

    dougli committed Sep 19, 2012
    Summary:
    Remove tokens dynamically with a proper function. Same implementation as
    Tokenizer.prototype._remove(), except without the focus calls.
    
    Test Plan:
    Copied changes to another branch, called the function, saw the token got
    removed.
    
    Reviewers: epriestley, linjeffrey
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D3525
Commits on Oct 4, 2012
  1. Merge pull request #36 from roddylindsay/master

    epriestley committed Oct 4, 2012
    add an enable() method to Typeahead
  2. add enable() method to Typeahead

    roddylindsay committed Oct 4, 2012
    Summary: adds an enable() method to Typeahead.  Use case is the following: I have a tokenizer and when a certain class of tokens is selected I want to disable the typeahead.  When those tokens are removed I want to re-enable the typeahead.
    
    Test Plan: Implemented tokenizer with this behavior
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D3617
Commits on Oct 1, 2012
  1. Respect ports in JX.URI

    epriestley committed Oct 1, 2012
    Summary: durrrrrp
    
    Test Plan: My local install on 8080 works better now. New test passes.
    
    Reviewers: vrana, btrahan
    
    Reviewed By: btrahan
    
    CC: aran
    
    Differential Revision: https://secure.phabricator.com/D3573
Commits on Sep 22, 2012
  1. Merge pull request #35 from hedgerwang/master

    rboyce committed Sep 22, 2012
    TypeaheadCompositeSource
Commits on Sep 20, 2012
  1. Fix JS error from TypeaheadCompositeSource.

    hedgerwang committed Sep 20, 2012
    Summary:
    The callback function childWaiting checks the length of this.result which could
    be null and cause JS error.
Commits on Sep 17, 2012
  1. Allow handling dblclick event

    vrana committed Sep 17, 2012
    Test Plan: See D3509.
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D3508
Commits on Sep 10, 2012