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

Added URL as a property on the frontend #228

Merged
merged 4 commits into from
Apr 8, 2021
Merged

Added URL as a property on the frontend #228

merged 4 commits into from
Apr 8, 2021

Conversation

BharatKalluri
Copy link
Contributor

Added URL as a proprty option on the frontend

Summary

Takes #84 as a reference 😅 and adds a URL prop on the frontend. Seems like its already a part of propertyValue

Ticket Link

#37

I had one small question, eventually will focalboard have validations on the text in the propertyValue?

@mattermod
Copy link
Contributor

Hello @BharatKalluri,

Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here.

@BharatKalluri BharatKalluri mentioned this pull request Apr 1, 2021
@chenilim
Copy link
Contributor

chenilim commented Apr 1, 2021

Thanks for the PR @BharatKalluri! Let's hold off on this one for now.

Currently the 'text', 'number' and 'email' properties all map to an Editable text field. They should instead map to distinct controls with validation, etc. For instance, we should not be able to enter letters into a number field. Emails and URLs should be validated.

@jespino
Copy link
Contributor

jespino commented Apr 8, 2021

@BharatKalluri I added a property validator mechanism in master, do you mind to merge master in your branch and add the url validator there? With that, I think this PR is ready to go.

@BharatKalluri
Copy link
Contributor Author

Sure, I'll be adding the URL regex from https://www.urlregex.com/

The regex for a URL is given to be
/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[\-;:&=\+\$,\w]+@)?[A-Za-z0-9\.\-]+|(?:www\.|[\-;:&=\+\$,\w]+@)[A-Za-z0-9\.\-]+)((?:\/[\+~%\/\.\w\-_]*)?\??(?:[\-\+=&;%@\.\w_]*)#?(?:[\.\!\/\\\w]*))?)/

Copy link
Contributor

@jespino jespino left a comment

Choose a reason for hiding this comment

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

Now looks good to me. Thanks! 🎉

@jespino jespino merged commit 0946ed1 into mattermost-community:main Apr 8, 2021
@BharatKalluri BharatKalluri deleted the feat/add_url_prop_frontend branch April 8, 2021 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants