-
Notifications
You must be signed in to change notification settings - Fork 173
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
Disable form validation for text properties #1418
Conversation
…enger handles and relationships Signed-off-by: Christian Kraus <hanzi@hanzi.cc>
Signed-off-by: Christian Kraus <hanzi@hanzi.cc>
Codecov Report
@@ Coverage Diff @@
## master #1418 +/- ##
=======================================
Coverage 62.31% 62.31%
=======================================
Files 4 4
Lines 69 69
=======================================
Hits 43 43
Misses 26 26 Continue to review full report at Codecov.
|
Thanks for your awesome work!! You can also just override types in the rfcProps file. I still think that having email, URL.. is an improvement. But for some properties this is indeed an issue :) |
I thought about that as well, but ultimately decided against doing it that way. I don't think that it's necessarily the app's job to validate user input at this point. Nothing really relies on this data, it's more of a fancy notebook. So if the user wants to enter seemingly invalid data -- why should we stop them? |
It's still giving proper feedback to the user.
Because then we get corrupted vcards or the icaljs library reject the changes and we get user reporting the app doesn't work ;) |
The thing is that the validation doesn't prevent the saving of any invalid cards. Saving still occurs because we're not actually using the Also, for none of the affected fields were there any issues with either ical.js handling the card or the server accepting it during my tests. I agree that it would be nice to have better feedback if there's an error with ical.js/server but the form validation doesn't do that either. It just adds another layer that might (and does) give false positives. So at the very least, it's misleading UI: A red outline would usually mean 'cannot submit this' to a user, but we're actually submitting it without asking. And it's bad UX: Form validation should hint at wrong input, when in fact most of the time this will probably highlight data already coming from the server. (Because as I said, other clients like Android or Outlook will let you fill these forms with whatever you want.) |
Then let's leave it like that? |
This seems the strongest argument for changing it: Data you already have might be highlighted, and people are used to put everything in from other platforms. :) Then again, the type of the fields also triggers different keyboards like a number pad for Is it possible to have the benefit of that without the hassle of unneeded inline validation? |
I don't think so :( |
Yeah, and it's already part of this PR: Using the inputmode attribute. Basically the same as using |
Then let's get this in! |
Well, support on desktop browsers isn't really that important for on-screen keyboards, is it? |
Fair enough. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for the design reasoning
fixes #1214
relates to #1324
relates to #1395
Currently, we mark some input fields as
type="url"
,type="tel"
andtype="email"
depending on the property name and sometimes depending on what ical.js expects those fields to contain.This triggers form validation in some browsers which will then highlight the field as erroneous if the contents don't match the type.
Reasons against this behaviour:
RELATED
orIMPP
might genuinely need to contain values that do not match the usual URL pattern. (ForRELATED
the RFC even explicitely allows arbitrary text values, forIMPP
see Skype login is proclaimed to be wrong #1214)In order to keep specialised keyboards in mobile browsers, I used the
inputmode
attribute instead.