zulip-desktop
zulip-desktop copied to clipboard
server_form: Added autocomplete function to url.
Added functionality for autocomplete when the user only passes a Organization URL string . As discussed here :
The following interpretation is made keeping the rest as it is : foo → https://foo.zulipchat.com
Fixes #1012
You have tested this PR on:
- [ ] Windows
- [x] Linux/Ubuntu
- [ ] macOS
I think when the user enters the actual Url that is https://foo.zulipchat.com your code would still add the suffix and prefix.
https://foo.zulipchat.com →https://https://foo.zulipchat.com.zulipchat.com
That's interesting ! , It returns false
when such a Url is passed , hence not adding the suffix and prefix.
> const pattern = /^[a-zA-Z\d-]*$/; undefined > pattern.test("https://foo.zulipchat.com"); false >
Heads up @aryanshridhar, we just merged some commits that conflict with the changes your made in this pull request! You can review this repository's recent commits to see where the conflicts occur. Please rebase your feature branch against the upstream/main
branch and resolve your pull request's merge conflicts accordingly.