Skip to content

Planning next version #272

Closed
Closed

Description

@mgod

Hi everyone!

It's been a while since I've done significant work on this project and there are a number of bugs that have cropped up (#253, #242, #241, #238, #237, #228, #226, #220, #193, #184, #183, #172, #132, #95) that will require a lot of reworking. There are also some use cases I hadn't considered during my initial design that don't work well with the current structure. I'd also like to simplify and automate the testing process.

Part of this is that I'll be removing a lot of features and reducing the public interface of the class as much as possible. To help me figure out what I should keep and do better planning out improvements, please comment and let me know how you're using it. Here's the template I'd like to see. Please copy and paste this into a comment and complete it. See my example below.

### My use case (a few sentences describing it)

### Settings (choose the correct one in each [], first option is the default)

 - setDeletionStyle([Clear, PartialCompletion, ToString])
 - setTokenClickStyle([None, Delete, Select, SelectDeselect])
 - allowDuplicates([true, false])
 - performBestGuess([true, false])
 - allowCollapse([true, false])

### API (delete all functions you do not use directly)

 - setPrefix()
 - setSplitChar()
 - setTokenLimit()
 - setTokenizer()
 - setTokenListener()
 - getObjects()
 - addListeners()
 - removeListeners()
 - clearCompletionText()
 - currentCompletionText()
 - performCompletion()
 - performCollapse()
 - addObject()
 - removeObject()
 - clear()

### Behavior overrides (delete all functions you do not override)

 - performFiltering()
 - isTokenRemovable()
 - maxTextWidth()
 - enoughToFilter()
 - buildSpanForObject()
 - replaceText()
 - getSerializableObjects()
 - convertSerializableArrayToObjectArray()
 - canDeleteSelection()

### Workarounds (any customization that is likely to break if I stop subclassing MultiAutoCompleteTextView)


### Feature requests (anything you currently do that the library could do for you)

Activity

  1. mgod commented on Jan 11, 2017

    @mgod
    ContributorAuthor

    My use case (a few sentences describing it)

    We use the library to allow the user to select a list of people when creating an expense. We load data from the the Android contacts provider and a local database of existing Splitwise friends.

    Settings (choose the correct one in each [], first option is the default)

    • setDeletionStyle(Clear)
    • setTokenClickStyle(Select)
    • allowDuplicates(true)
    • performBestGuess(true)
    • allowCollapse(true)

    API (delete all functions you do not use directly)

    • setPrefix()
    • setTokenListener()
    • getObjects()
    • currentCompletionText()
    • addObject()
    • removeObject()

    Behavior overrides (delete all functions you do not override)

    • getSerializableObjects()
    • convertSerializableArrayToObjectArray()

    Workarounds (any customization that is likely to break if I stop subclassing MultiAutoCompleteTextView)

    1. We make the drop down appear the first time the view is visible even if there's no completion text.
    2. We add a text watcher the updates a separate view with the currentCompletionText() when the user types.

    Feature requests (anything you currently do that the library could do for you)

    1. I'd like it if the library let me style more of the view in the XML layout instead of in code
    2. Update the styles in the view to more closely match MD guidelines and use AppCompat views.
  2. raylee4204 commented on Jan 19, 2017

    @raylee4204

    My use case

    We use the library to allow the user to add hashtags to show their interests, and also select a list of people when sending them SMS messages. We load data from the API to pull suggested hashtags, and for SMS , from the Android contacts provider

    Settings

    setDeletionStyle(Clear)
    setTokenClickStyle(None)
    allowDuplicates(false)
    performBestGuess(false)
    allowCollapse(false)

    API

    setTokenListener()
    getObjects()
    addObject()
    removeObject()

  3. mgod commented on Feb 8, 2017

    @mgod
    ContributorAuthor

    @raylee4204 Thanks for the feedback! When you're getting the hashtags, is it just a list of hashtags or do you let the user enter other text as well like a Tweet editor?

  4. raylee4204 commented on Feb 8, 2017

    @raylee4204

    @mgod I do accept regular texts along with hashtags.

  5. biovolt commented on Feb 22, 2017

    @biovolt

    My use case :

    I use TokenAutoComplete to autocomplete a list of areas in my app using my own adapter that fetches the data from the server
    Thank you for your contribution

    Settings (choose the correct one in each [], first option is the default)

    • setDeletionStyle([Clear])
    • setTokenClickStyle([ Select])
    • allowDuplicates([false])
    • performBestGuess([true])
    • allowCollapse([false])

    API (delete all functions you do not use directly)

    • setAdapter
    • setSplitChar()
    • setTokenListener()
    • getObjects()
    • addListeners()
    • removeListeners()
    • clearCompletionText()
    • addObject()
    • removeObject()
    • clear()

    Behavior overrides (delete all functions you do not override)

    Workarounds (any customization that is likely to break if I stop subclassing MultiAutoCompleteTextView)

    I am using our own class to create the tokens and swop the images to make it clear that they need to click to select and then delete

    Feature requests (anything you currently do that the library could do for you

    I would like to add a remove image to the token and add an onclick to the image so that they can remove the token with 1 click
    setTokenClickStyle() - > remove image

  6. mgod commented on Jan 13, 2018

    @mgod
    ContributorAuthor

    @biovolt Just to clarify for me, by "add a remove image" to the token, do you mean adding a separate area of the token that you can style that responds to selections differently than the main token body? I've been pretty hesitant to allow sub-token clicking both because it's hard and it feels like most tokens should be small enough that having separate click areas would be confusing for the user. I had intended TokenClickStyle.Delete for cases where you want to 1-click delete tokens as that felt like the more usable choice to me.

  7. biovolt commented on Jan 14, 2018

    @biovolt
  8. deleted a comment from riyase on Jul 8, 2018
  9. deleted a comment from riyase on Jul 8, 2018
  10. deleted a comment from Danish1111 on Jul 8, 2018
  11. mgod commented on Jul 8, 2018

    @mgod
    ContributorAuthor

    I've just deleted some comments because this isn't a help thread. If you're not commenting about what features you currently use in the library, please look for a different thread to post in or create a new one. I usually respond fairly quickly to new issues unless they 1) are the same as an existing open issue (though I try to point to the current issue in this case) or 2) do not provide enough context for me to understand what's being asekd.

  12. jrcacd commented on Oct 9, 2018

    @jrcacd

    When will be released the new version?

  13. mgod commented on Oct 24, 2018

    @mgod
    ContributorAuthor

    I don't have a timeline for the next version. There is a 3.0.0-alpha version you can get with implementation 'com.splitwise:tokenautocomplete:3.0.0-alpha@aar' in your gradle dependencies, but I'm not quite done changing the interfaces I'm updating and there's no migration guide yet.

  14. jrcacd commented on Oct 25, 2018

    @jrcacd

    Thanks,

    This is a must have library

  15. mgod commented on Nov 30, 2018

    @mgod
    ContributorAuthor

    There's a version 3.0.0-alpha2 available now. I don't expect the public interface to change at this point, but I'm still ironing out some edge case bugs.

  16. jrcacd commented on Dec 3, 2018

    @jrcacd

    Where's the .allowDuplicates(false) function?

  17. mgod commented on Dec 3, 2018

    @mgod
    ContributorAuthor

    I'll hopefully get a migration guide together soon, but

    setAllowDuplicates(false)
    

    is now (in your TokenCompleteTextView subclass):

    @Override
    public boolean shouldIgnoreToken(T token) {
        return getObjects().contains(token);
    }
    

    with the correct substitution for T.

  18. Krishnakantkhetan commented on Jan 25, 2019

    @Krishnakantkhetan

    Existing Bug
    If i add more than 100 email id's and performCollapse, the control gets stuck, it take a long time (more than 10 secs) to collapse.

    My use case :
    I use TokenAutoComplete to autocomplete a list of email id's copied from another source.

    Feature requests:
    I would like to have a paste option for bulk insertion at once. There should be addObjects() method to list of tokens.

  19. mgod commented on Mar 9, 2019

    @mgod
    ContributorAuthor

    3.0.0 is available now and the docs should be up to date. I believe I've addressed most of the requests here (please let me know how the free form text support works for you if you need it!).

    I've not added paste or bulk insert support. There's some ground work in place to make paste more reasonable to implement and addObjectSync should be much less resource intensive in a loop than the current addObject code.

    I'm also not planning to support handling clicks on different pieces of the tokens. It's clear from looking at the underpinnings of the text layout that this problem is beyond the scope of what I can support in the library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions