-
Notifications
You must be signed in to change notification settings - Fork 188
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
feat(connection-form): support for multiple kms options from same provider COMPASS-8082 #6166
Conversation
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.
Left two comments before diving into a bigger review, hopefully tomorrow 🙂
packages/compass-connections/src/stores/connections-store-redux.ts
Outdated
Show resolved
Hide resolved
...ages/connection-form/src/components/advanced-options-tabs/csfle-tab/kms-provider-content.tsx
Outdated
Show resolved
Hide resolved
…PASS-8082-multiple-kms-providers
if (isAction<CloseAction>(action, CreateNamespaceActionTypes.Close)) { | ||
// When a modal is closed, we should not clear the connectionMetaData | ||
return { | ||
...INITIAL_STATE, | ||
connectionMetaData: state.connectionMetaData, | ||
}; | ||
} |
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.
Drive-by: when opening modal to create a collection after closing it first time, the UI did not show encryption options, because we set connectionMetaData
to initial state ({}
).
…PASS-8082-multiple-kms-providers
b1e0b6b
to
188bfaf
Compare
packages/connection-form/src/components/advanced-options-tabs/csfle-tab/csfle-tab.spec.tsx
Outdated
Show resolved
Hide resolved
packages/connection-form/src/components/advanced-options-tabs/csfle-tab/csfle-tab.tsx
Outdated
Show resolved
Hide resolved
packages/connection-form/src/components/advanced-options-tabs/csfle-tab/kms-provider-card.tsx
Outdated
Show resolved
Hide resolved
packages/connection-form/src/components/advanced-options-tabs/csfle-tab/kms-provider-card.tsx
Outdated
Show resolved
Hide resolved
...ages/connection-form/src/components/advanced-options-tabs/csfle-tab/kms-provider-content.tsx
Outdated
Show resolved
Hide resolved
...ages/connection-form/src/components/advanced-options-tabs/csfle-tab/kms-provider-content.tsx
Outdated
Show resolved
Hide resolved
return Object.fromEntries( | ||
Object.entries(obj).filter(([, value]) => Object.keys(value).length > 0) | ||
) as Partial<T>; | ||
); | ||
} |
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 just removes the return type annotation and reduces type safety overall – any particular reason for that?
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 i reverted and added annotation back in 31d9e6f
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 mean the return type annotation is still missing but that's not a big deal
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.
🤦🏽
b2fe096
to
328a7c1
Compare
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.
🚀
noTLS={noTLS} | ||
/> | ||
</Card> | ||
); |
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.
Just wanted to say, I tried this out locally and it all feels very smooth and intuitive! This is amazing work ✨
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.
Looks good, feel free to consider the remaining unresolved comments optional 👍
Preview
Description
Checklist
Motivation and Context
Open Questions
Dependents
Types of changes