watomatic icon indicating copy to clipboard operation
watomatic copied to clipboard

Contacts selection feature improvements (Sort, Search) RFE

Open adeekshith opened this issue 3 years ago • 18 comments

We now have contacts exclusion/inclusion feature, thanks to @hegocre. Here are some improvements I had in mind:

  • [x] Move contacts selection to separate activity (something like this)
  • [x] Show undo button for bulk changes
  • [x] Sort contacts by selected first
  • [ ] Provide search feature
  • [x] Add floating material "+" button to add custom strings/patterns so users can add group names or user names which are not in contacts (Ex: Unlike WhatsApp, name on Facebook may not be the ones from Contacts). Which means, we should also have an option to delete these custom patterns. Any better way to implement this is welcome.
  • [x] Allow users to enable contact based reply without enabling contact permission.
  • [ ] Read contacts' number to be able to contact filter when WhatsApp is not granted contact reading permission.

Feel free to comment how you 👍/👎 each of these and suggest improvements. Can create separate issue for each of the above and link them here when we are working on these.

adeekshith avatar Jun 08 '21 23:06 adeekshith

I will implement each one of these on separate PR as I have time (some are easier than others to implement)

hegocre avatar Jun 15 '21 12:06 hegocre

Regarding save button, we should also think how it fits when we implement search. Screen Shot 2021-06-16 at 5 48 31 PM

Another common UX pattern these days instead of save button is to use an undo button. May be a Snackbar with "Undo" action? Reference: https://goodui.org/#8 and check this discussion on stackexchange

Screen Shot 2021-06-16 at 5 48 31 PM

Just putting some points forward but lets do whatever is easy for now and we can iterate on it in the future 😊

adeekshith avatar Jun 16 '21 23:06 adeekshith

Thinking about this more, only actions that need confirmation in the contacts selector UI are "Select All" and "Select None". So we can have confirmation dialog for those. Individual checkbox clicks are easily undo-able by the user so those can be saved without confirmation. Let me know what you think.

adeekshith avatar Jun 18 '21 13:06 adeekshith

So you suggest saving the contact list immediately after every change?

hegocre avatar Jun 18 '21 13:06 hegocre

So you suggest saving the contact list immediately after every change?

Yes, we can save the contact list immediately except for "Select All" and "Select None" where we show a confirmation dialog when the user clicks on them.

adeekshith avatar Jun 18 '21 13:06 adeekshith

We can do whatever is easy for now but just logging thoughts for the future. Adding a confirmation dialog while going back as you suggested might do for now.

adeekshith avatar Jun 18 '21 14:06 adeekshith

Shouldn't be difficult to implement. We can move the methods to save the configuration changes to the recycler view adapter, so we can call the methods from both the adapter and ContactHelper, and then simply save the configuration when a checkbox is selected. We also implement a method to create a "checkpoint" whenever the select all or none buttons are pressed, so we can show the undo option.

hegocre avatar Jun 19 '21 19:06 hegocre

Regarding save button, we should also think how it fits when we implement search. Screen Shot 2021-06-16 at 5 48 31 PM

Another common UX pattern these days instead of save button is to use an undo button. May be a Snackbar with "Undo" action? Reference: https://goodui.org/#8 and check this discussion on stackexchange

Screen Shot 2021-06-16 at 5 48 31 PM

Just putting some points forward but lets do whatever is easy for now and we can iterate on it in the future 😊

Hey,

I am new to this world and would love to contribute wherever I can, if you dont't mind can I pick the search functionality for contact selector?

releyannu avatar Jul 07 '21 13:07 releyannu

Hey, I am new to this world and would love to contribute wherever I can, if you dont't mind can I pick the search functionality for contact selector?

It's perfectly fine for me. However, I would recommend you to wait for the custom string options to be implemented, so you don't have to rewrite the search functionality again. I'm planning to implement it this weekend, though I could try to do it sooner if needed.

hegocre avatar Jul 07 '21 13:07 hegocre

@releyannu As the custom contacts feature is now implemented, feel free to implement the search feature. If you have any question don't hesitate to ask me!

hegocre avatar Jul 12 '21 15:07 hegocre

Hey @adeekshith , I was reading the telegram discussion on the latest release and thought of a new feature, which is allowing users to enable contact based reply without enabling contact permission (now that we support custom strings, it's not strictly necessary). What do you think?

hegocre avatar Jul 12 '21 21:07 hegocre

Hey @adeekshith , I was reading the telegram discussion on the latest release and thought of a new feature, which is allowing users to enable contact based reply without enabling contact permission (now that we support custom strings, it's not strictly necessary). What do you think?

Sounds good! We can instead have a button in the Contact selector UI to enable system access permission (better ideas welcome).

adeekshith avatar Jul 13 '21 13:07 adeekshith

I think of two options

  • Leave it as a contact selector, which would work the same way as it does now. If the user does not accept the permission, the feature is enabled anyway, but with a warning saying that they will only be able to add custom strings.
  • Rename the feature as "Name filtering" (a better name should be thought), and create the new option to allow the app to read the contacts and add it automatically as it does now.

Let me think which one you like the most, I personally like the first one better.

hegocre avatar Jul 14 '21 11:07 hegocre

Also, another think we can do, unrelated to this, is read the contact names as well as it's numbers, to allow contact filtering for users that don't allow WhatsApp the read contacts permission (saw a user saying this on the telegram discussion as well).

hegocre avatar Jul 14 '21 11:07 hegocre

I think of two options

* Leave it as a contact selector, which would work the same way as it does now. If the user does not accept the permission, the feature is enabled anyway, but with a warning saying that they will only be able to add custom strings.

* Rename the feature as "Name filtering" (a better name should be thought), and create the new option to allow the app to read the contacts and add it automatically as it does now.

Let me think which one you like the most, I personally like the first one better.

First one is good but we should provide a UI where users can enable contacts access later.

adeekshith avatar Jul 15 '21 14:07 adeekshith

Also, another think we can do, unrelated to this, is read the contact names as well as it's numbers, to allow contact filtering for users that don't allow WhatsApp the read contacts permission (saw a user saying this on the telegram discussion as well).

Yeah right! That would be awesome. Actually I didnt think about this too until the user mentioned 😃

Possible issue we need to look for with number matching is the country codes and number formatting. Users may save the number as "2170990999" but WhatsApp notificattion may show it as "+1 217-099-0999" or "+1 (217) 099 0999". Did not check it myself but just a possible issue.

adeekshith avatar Jul 15 '21 14:07 adeekshith

Possible issue we need to look for with number matching is the country codes and number formatting. Users may save the number as "2170990999" but WhatsApp notificattion may show it as "+1 217-099-0999" or "+1 (217) 099 0999". Did not check it myself but just a possible issue.

You are right. Looks like it will be difficult, it will be very hard to be 100% accurate, because of spaces, country codes, etc. Maybe the easiest way would be to remove spaces, "-" and other symbols if any, and if there's no country code stored in the contact, assume it's correct.

hegocre avatar Jul 17 '21 14:07 hegocre

Hey @releyannu

Are you still up to implementing the search feature? You can go ahead whenever you want, or just tell us if you are too busy or not interested anymore so we can pick it up!

Thanks!

hegocre avatar Aug 28 '21 01:08 hegocre