Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server_form: Added autocomplete function to url. #1043

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aryanshridhar
Copy link
Member

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
  • Linux/Ubuntu
  • macOS

Autocompletes when the user passes only org url,
in the server url input.

Fixes zulip#1012
Copy link
Contributor

@tarun8718 tarun8718 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.comhttps://https://foo.zulipchat.com.zulipchat.com

@aryanshridhar
Copy link
Member Author

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.comhttps://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
> 

Base automatically changed from master to main January 22, 2021 19:22
@zulipbot
Copy link
Member

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.

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

Successfully merging this pull request may close these issues.

add organization: url: attempt to autocomplete with zulipchat.com
3 participants