-
Notifications
You must be signed in to change notification settings - Fork 445
Preventing initialize when name & email is not present #319
Preventing initialize when name & email is not present #319
Conversation
dbe7825
to
e09d1cd
Compare
So functionally this is fine, but it's very user unfriendly. If we're requiring a specific user action, we shouldn't present it in the same way as we do errors, users will think it's an error. We should also provide an easy way to go to the place where the user is expected to fill out the needed information - i.e., if we say "Fill out x in this window", we should have a link or button that sends them to it, or we should specify how to get to it. This is btw why I would prefer not to do these UI changes until next week, because it's just another piece of temporary UI that we will have to fix :/ |
What I don't like about this is the odd repetition of this functionality... Unity/src/UnityExtension/Assets/Editor/GitHub.Unity/UI/InitProjectView.cs Lines 139 to 166 in 5e02c39
Unity/src/UnityExtension/Assets/Editor/GitHub.Unity/UI/UserSettingsView.cs Lines 118 to 132 in 5e02c39
I contemplated making |
Maybe a combined method in |
Yep, that took care of things nicely. |
🦆 |
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.
Some of the changes to reduce duplicated code in this PR don't go far enough, we still have the same piece of code in three different places. However, they're tangential to the bugfix of this PR, so I'm happy with that getting addressed in another PR.
} | ||
}) | ||
.Start(); | ||
GitClient.GetConfigUserAndEmail().FinallyInUI((success, ex, strings) => { |
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.
This is the same code that RepositoryManager is running to load a user, which still feels duplicated. We also shouldn't be calling GitClient directly from the UI, sooo... feels like we should have a User class with static methods that can load itself, it we don't have a Repository/RepositoryManager to do it for us? And then everyone calls that?
Also the UI is janky but then again that's not the main point of this PR (is the screenshot up to date?) so I'm ok with merging this and polishing separately. |
Fixes #315
Depends on: