focus-android icon indicating copy to clipboard operation
focus-android copied to clipboard

4.1 RC - A User Should Not Be Able to Add Duplicate Custom URLs

Open ioana-chiorean opened this issue 8 years ago • 11 comments

Build from: https://bugzilla.mozilla.org/show_bug.cgi?id=1447461 - app-focus-webview-universal-release-signed-and-aligned.apk Pixel 2 - Android 8.1

Steps:

  1. Go to Settings -> URL Autocomplete -> Custom URL
  2. Enable Custom URL and tap on it
  3. add several custom URLs ( try same one different times)
  4. Tap 3 dots menu and choose remove
  5. Choose one of the duplicates

Expected:

  • at step 3 you should not be able to add duples

Actual:

  • at step 3 you are able to add dupes

Note:

  • I have added the deletion steps because i got to this enhancement by mistake - I have added Mozilla.org and mozilla.org and thought they are displayed the same name but read different but when deleting one mozilla.org both are deleted.
  • if we keep allowing dupes we should not delete all instance at once

ioana-chiorean avatar Mar 21 '18 18:03 ioana-chiorean

@bbinto to decide where to put this.

Sdaswani avatar Mar 27 '18 17:03 Sdaswani

@brampitoyo Do we want to show a toast if the user tries to add a domain that already exists? Or is it okay for it to just act like its been added since the domain is already in the list?

boek avatar Mar 29 '18 22:03 boek

Is this issue solved or is still pending?

shikhart98 avatar Mar 30 '18 14:03 shikhart98

Hey @shikhart98, the issue is pending an answer from UX with the expected behavior. :) Once we get an answer you're more than welcome to pick it up

boek avatar Mar 30 '18 16:03 boek

The expected behaviour is for the form to give a “URL already exists” error on submission.

If everything else looks good, this issue is now ready to pick up.

brampitoyo avatar Apr 02 '18 23:04 brampitoyo

I'm working on it! almost done! will make a PR today.

On Tue, Apr 3, 2018, 4:38 AM Bram Pitoyo [email protected] wrote:

The expected behaviour is for the form to give a “URL already exists” error on submission.

[image: url-already-exists] https://user-images.githubusercontent.com/51007/38220568-fbb50964-372e-11e8-843c-cedae62d5339.png

If everything else looks good, this issue is now ready to pick up.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mozilla-mobile/focus-android/issues/2363#issuecomment-378076781, or mute the thread https://github.com/notifications/unsubscribe-auth/Ab8ucRfH-BO0gpgxztepblKUVGuPPhYTks5tkq9xgaJpZM4S1HJK .

shikhart98 avatar Apr 03 '18 03:04 shikhart98

Previously I have added a tost over there screenshot_20180403-085558

shikhart98 avatar Apr 03 '18 03:04 shikhart98

@brampitoyo I tried implementing what you want, but did not find any function in UrlAutoCompleteFilter.kt to get the list of customDomains so that I can put condition and show error! I also wrote a function to return the customDomains in UrlAutoCompleteFilter.kt but something is going wrong as the list I get is always empty.

shikhart98 avatar Apr 04 '18 15:04 shikhart98

I think this is an engineering question for @boek or @pocmo! Pinging them here.

brampitoyo avatar Apr 05 '18 01:04 brampitoyo

@brampitoyo I have solved the problem and this issue! just making a PR to this.

shikhart98 avatar Apr 05 '18 03:04 shikhart98

Can someone just review my PR on this issue.

shikhart98 avatar Apr 09 '18 06:04 shikhart98