-
Notifications
You must be signed in to change notification settings - Fork 214
chore(data-modeling): add most of the redux store logic and a basic UI for it #6879
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
Conversation
e45a4fe
to
92c0b94
Compare
92c0b94
to
2a67c20
Compare
connectionId: z.string().nullable(), | ||
|
||
// TODO: define rest of the schema based on arch doc / tech design | ||
edits: z.array(z.unknown()).default([]), |
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.
Should we add createdAt and updatedAt?
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.
Yes, definitely! There's an example in pipeline storage where we get this info from the file stats, but also I guess for web we'd need to just set it on save because there are no stats there
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.
Noting we might not need this as we can refer to the edits in the diagram for this. Each edit will have a timestamp (first is the createdAt, last would be updatedAt).
@@ -112,6 +112,29 @@ delete (Checkbox as React.ComponentType<any>).propTypes; | |||
// all hrefs. | |||
export { Link, Button, IconButton } from './links/link'; | |||
|
|||
// Working around leafygreen lack of support for `defaultValue` property |
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.
Asked about it here, if they open a ticket, we can link it here
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.
Okay, we have a ticket to follow now https://jira.mongodb.org/browse/LG-5063
@@ -207,3 +209,32 @@ export const ConfirmationModalArea: React.FunctionComponent = ({ | |||
</ConfirmationModalAreaMountedContext.Provider> | |||
); | |||
}; | |||
|
|||
export async function showPrompt( |
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.
New thing: similar to showConfirmation allows to prompt the user in place without the need for all the extra state that's usually associated with this sort of modal UI
@@ -6,10 +6,10 @@ import { | |||
FormFieldContainer, | |||
FormModal, | |||
openToast, | |||
SelectTable, |
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.
Moved out of connection-import-export to compass-components as we now have two places where this UI is used
const deviceAuthAbortController = new AbortController(); | ||
|
||
connectionInfo = cloneDeep(connectionInfo); | ||
try { |
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.
Fun bug I found in connect logic while working on this: because we only clean up inflightConnection
in the finally
, if you short circuit before that, you can never reconnect 🙈 Before that this was only affecting maximumNumberOfActiveConnections
check and I'm just assuming that it was a corner-case enough that nobody ever ran into this yet
This PR contains all of the redux store busines logic required for the groundwork project + most of the rough UI attached to the store
Work in progress, I'll probably not finish this fully before I'm OOO, but this can basically be polished into a fully finished implementation, I'll also use this as a base for the tech design
Main things missing at the moment:
For obvious reasons the most interesting part in this PR that's worth a thorough look is the redux store as the UI is mostly throwaway