-
Notifications
You must be signed in to change notification settings - Fork 189
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
fix: save&connect COMPASS-8068 #6037
Conversation
98192f6
to
f2e3da0
Compare
6232379
to
4bd5644
Compare
b5ccb0e
to
036d47f
Compare
is_favorite: Boolean(favorite), | ||
is_recent: Boolean(lastUsed && !favorite), | ||
is_favorite: isFavorite, | ||
is_recent: Boolean(lastUsed && !isFavorite), |
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 a driveby - noticed via a broken e2e test. the favorite object contains the color and name, which can now exist on non-favorite connections 🙈 . we didn't rename because it would require a migration of the stored connections. the proper way to check for a favorite is via savedConnectionType.
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.
had to update another unit test: a192470
Description
Aside of renaming the button to save&connect, this PR is trying to make a clearer distinction between 'connect' and 'saveAndConnect', legacy and new code. For example making sure the submitForm is always explicitly one or the other - previously we had inconsistent behaviour between submit via button and submit via keystroke, likely because we didn't notice the other calls. So after I removed the extra "save", we were saving only once in the first case but zero times in the second! 🤦 I blame the complexity of the legacy form, and can't wait for the cleanup 😁 🔥
Also I marked
ConnectFormActions
as legacy and replaced it's unit tests with tests for the newConnectionFormModalActions
. Today I learned these are still used for VSCode, but I don't think that's a reason to maintain the separate component - we just need some flags to prepare the new component for VSCode. I created COMPASS-8098 to be done before we do the clean up and enable the new form in VSCode (COMPASS-7762)Scenarios tested:
Checklist
Motivation and Context
Open Questions
Dependents
Types of changes