Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestions #17

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

Suggestions #17

wants to merge 14 commits into from

Commits on Aug 11, 2014

  1. WIP: add autocomplete to token field

    Thus far, we have the concept of autocomplete, the data source API, and
    callbacks where we would be showing and hiding the table view so far.
    Definitely more work to complete it, but this is a good checkpoint.
    Ben Nicholas committed Aug 11, 2014
    Configuration menu
    Copy the full SHA
    5da4f7b View commit details
    Browse the repository at this point in the history
  2. WIP: Display autocomplete table

    This is still a work in progress, but the table view will actually
    render in the appropriate location now. At some point I appear to have
    broken the VENTokenField resizing, and actually taking an auto complete
    suggestion is still not supported. Just another checkpoint in the
    implementation.
    Ben Nicholas committed Aug 11, 2014
    Configuration menu
    Copy the full SHA
    f3c2ede View commit details
    Browse the repository at this point in the history
  3. Fix a layout bug related to the autocomplete table

    By adding the table to the active window rather than to the
    tokenField’s super view, I’m avoiding a bug where the frame  of the
    token field is reset when it should be growing. This should also help
    make sure the table view is on top of any other views that happen to
    exist in the super view.
    Ben Nicholas committed Aug 11, 2014
    Configuration menu
    Copy the full SHA
    567d470 View commit details
    Browse the repository at this point in the history
  4. WIP: Allow selecting from autocomplete options

    I made the decision that autocomplete is just a typing accelerator,
    meaning that there is no dedicated callback for selecting an
    autocompleted value, instead the actual value selected is sent back
    just as if it was typed manually. I may change this before everything
    is complete, as this pushes more (potential) verification on the client
    without a lot saved for us.
    Ben Nicholas committed Aug 11, 2014
    Configuration menu
    Copy the full SHA
    556b413 View commit details
    Browse the repository at this point in the history

Commits on Aug 12, 2014

  1. Redesign autocomplete API

    Instead of having an API that involves handing over a full array (that
    may be thousands of items long) I switched over to one more similar to
    a table view. I also broke out all of the autocomplete stuff to a
    separate protocol instead of expanding the current data source.
    Ben Nicholas committed Aug 12, 2014
    Configuration menu
    Copy the full SHA
    b06a6c8 View commit details
    Browse the repository at this point in the history
  2. Add seperate call back for autocomplete

    Rather than making the client distinguish whether the entered text came
    from a suggestion or not, we now have a delegate method for having
    selected a suggestion. This is fired in addition to
    tokenField:didEnterText: in order to allow users to opt in or to simply
    enable autocomplete and use the same delegate methods as before.
    Ben Nicholas committed Aug 12, 2014
    Configuration menu
    Copy the full SHA
    62a97b2 View commit details
    Browse the repository at this point in the history
  3. Update documentation with new autosuggest API

    Ben Nicholas committed Aug 12, 2014
    Configuration menu
    Copy the full SHA
    b7d49d3 View commit details
    Browse the repository at this point in the history
  4. Update tests to leave the field in a good state

    Ben Nicholas committed Aug 12, 2014
    Configuration menu
    Copy the full SHA
    12da455 View commit details
    Browse the repository at this point in the history
  5. Switch from autocomplete to suggestions

    autocomplete has a bad connotation, and isn’t really what we’re looking
    for in this case. This is really just a suggestion engine.
    Ben Nicholas committed Aug 12, 2014
    Configuration menu
    Copy the full SHA
    144aaf8 View commit details
    Browse the repository at this point in the history
  6. Move suggestion files into the appropriate folder

    Xcode dropped them in the wrong folder and I didn’t notice that until
    now. Fixing it…
    Ben Nicholas committed Aug 12, 2014
    Configuration menu
    Copy the full SHA
    3ce200b View commit details
    Browse the repository at this point in the history
  7. Rename test to fix order

    XCTest runners test in what appears to be alphabetical order, or
    something close to it. Because of the naming, this test runs after
    resignFirstResponder, which leaves the system in a state where that
    test’s preconditions aren’t met - the keyboard is not up and ready to
    input in the text field. By changing from assuming the first responder
    to entering into the known good field, we stop worrying about order. I
    also applied this fix to the testBasicFlow test, which had to be broken
    into two steps due to the token field clearing properties.
    Ben Nicholas committed Aug 12, 2014
    Configuration menu
    Copy the full SHA
    cd7ea56 View commit details
    Browse the repository at this point in the history
  8. Update target frame of the table view

    We need to translate the frame of the tokenView into our destination
    view’s(the window) coordinates to keep the view properly aligned.
    Luckily, convertRect:toView: exists and does this hard work for us!
    Ben Nicholas committed Aug 12, 2014
    Configuration menu
    Copy the full SHA
    d88eea0 View commit details
    Browse the repository at this point in the history

Commits on Aug 13, 2014

  1. Add additional information to didSelectSuggestion:

    in real use, tokenField:didSelectSuggestion: didn’t provide the
    necessary information to map back to a list of full data objects
    without a lot of inefficient searching. This adds some information back
    to allow easy indexing into an underlying data store to avoid this
    pitfall.
    Ben Nicholas committed Aug 13, 2014
    Configuration menu
    Copy the full SHA
    cc352df View commit details
    Browse the repository at this point in the history
  2. Updating readme with the new delegate method

    Ben Nicholas committed Aug 13, 2014
    Configuration menu
    Copy the full SHA
    8691525 View commit details
    Browse the repository at this point in the history