-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Refactoring RepositoryForm Validators #2395
base: essentials-publish
Are you sure you want to change the base?
Conversation
await SafeRepositoryNameWarningValidator.ResetAsync(); | ||
RepositoryName = name; | ||
}); | ||
// this.WhenAny(x => x.SelectedConnection, x => x.SelectedAccount, |
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.
We should delete these comments!
@@ -25,8 +25,8 @@ public interface IRepositoryForm : IViewModel | |||
/// dashes. | |||
/// </summary> | |||
string SafeRepositoryName { get; } | |||
ReactivePropertyValidator<string> RepositoryNameValidator { get; } | |||
ReactivePropertyValidator<string> SafeRepositoryNameWarningValidator { get; } | |||
ReactivePropertyValidator<(string repositoryName, IConnection connection, IAccount account)> RepositoryNameValidator { get; } |
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.
Looking at the code, I can't see where we're using the connection
or account
for validation. I wonder if once upon a time we were checking for an existing repository with the same name as part of the validation? It looks like this check is now done and the error surfaced when the user attempts to create the repository.
I think we might be able to simplify this to use just the repositoryName
. I'm wondering if the buggy code was actually completely obsolete. ;-)
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.
I'm wondering if we could simply remove the buggy code?
See comment:
#2395 (review)
No description provided.