-
Notifications
You must be signed in to change notification settings - Fork 235
feat: add ChangeView component to bulk update preview #5209
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
return obj.changeType; | ||
} | ||
|
||
export function unifyDocuments( |
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.
Maybe start here. GitHub collapsed this file..
color: palette.gray.dark2, | ||
}); | ||
|
||
export function ChangeView({ |
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.
GitHub collapsed this file, but this is a good entry-point for the component if you prefer to read from that end.
? lookupValue((obj.right as Branch).path, right) | ||
: undefined; | ||
|
||
// TODO: BSONValue does not always show the bson type, so you can't spot bson type changes |
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.
TODO is not really the right word, but I did want to call attention to this. Since we're using the same components as the Document component the BSON values behave the same. So a Double with the value of 1
or an Int32 with value 1
or a Long with the value 1
all look the same.
This might not be much of a problem. As long we keep the before/after values with their types they will be stringified as new Double(1)
, new Int32(1)
and new Long(1)
respectively before being diffed and therefore it will show up as changed. But the "red" and "green" values will then look identical.
I just bring this up because during tech design some people mentioned bson type changes.
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 removed the TODO)
To review: Maybe start with
unifyDocuments()
inunified-document.ts
. Or alternatively just theChangeView
component inchange-view.tsx
. Don't be intimidated by the line count - it is almost all test fixtures' expected results.