mattermost / desktop

Mattermost Desktop application for Windows, Mac and Linux
Apache License 2.0
2.03k stars 829 forks source link

[MM-53799] Stop autocompleting while the user is typing `https://` #3202

Closed devinbinnie closed 1 week ago

devinbinnie commented 1 week ago

Summary

In circumstances where the user stopped typing, or was slow typing the beginning of their server URL, the URL validation would kick in and erroneously mistake the beginning of a URL (ie. any substring of https://) as a hostname, and try to add https:// for the user. This would cause some confusion and frustration for users trying to type.

This PR fixes the validation to recognize any leading substring of https:// as an invalid URL before it tries to call it a hostname. This stops the user from having to backspace and correct themselves while typing, and should still server to help people typing without the leading https://. Additionally, I added a QoL fix to stop the trailing / from appearing while you were typing a host name, so that if you do stop, you don't have to backspace the / first to keep typing the name.

Ticket Link

https://mattermost.atlassian.net/browse/MM-53799

Stop autocompleting while the user is typing `https://`
github-actions[bot] commented 1 week ago

Here are the test results below:

Test Summary for Linux on commit 8fb3ac46c0f31aed9821a161dd1e1c74ec830a62

The following known failed tests have been fixed on Linux:

Test Summary for macOS on commit 8fb3ac46c0f31aed9821a161dd1e1c74ec830a62

New failed tests found on macOS:

The following known failed tests have been fixed on macOS:

devinbinnie commented 1 week ago

might be a rare cases, that can occur when typing

  • typing Capital HTTPS, changes it into lower and adds https

Will make a fix for this.