-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
feat: expose field touched state #14692
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
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: bdedd6e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
01012dd to
b503fd7
Compare
|
Just tested it, works great for me! 👍 |
|
Sorry for asking here about the status again - we're desperately waiting for this feature and this pr has been unreviewed for almost 2 weeks now 🤷♂️ Is there anything that can be done to help get this reviewed soon(ish)? Thanks in advance! @LeeWxx do you think, you can request a review from maintainers? |
b503fd7 to
878e77c
Compare
|
@hrueger I don’t think I have permission to request reviewers either. |
|
Very strange... I usually don't tag random people as I've heard it is considered rude. So hopefully Mr Svelte himself (aka @Rich-Harris) sees this as a friendly request for review? 😃🙏 thanks in advance! |
|
I think it would be beneficial to differentiate (and individually support) both |
|
Ideally, I'd want to implement the following behavior:
Note that when inputting for the first time, it only can become red after it was already green. So that you don't confuse the user with a min length issue for example while he is still typing. Does that make sense? Hard to express in writing 😁 Would that be possible without manually keeping track of the validation success of each field? Maybe we need a blurredOnce tracker, too? Not sure. |
|
@LeeWxx I think a good place would be the contributors channel in the svelte discord. |
|
@firatciftci @hrueger I started with adding support for the touched state only in this PR to keep the scope small and focused. Once we agree on the purpose and desired behavior in the issue or discussion, I’m thinking of following up with another PR for dirty and related states. Would that make sense to you? |
#14665
Remote form fields expose field.touched() so apps can see whether a field or its children were interacted with, and client/server runtimes surface the existing touched map.
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
pnpm changesetand following the prompts. Changesets that add features should beminorand those that fix bugs should bepatch. Please prefix changeset messages withfeat:,fix:, orchore:.Edits