-
Notifications
You must be signed in to change notification settings - Fork 2
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
Enabling entity level setting for sourceCapture
optional settings
#1326
Enabling entity level setting for sourceCapture
optional settings
#1326
Conversation
…ncompatible-schema-entity-level
for sure - but want the UI stubbed out
Starting to move delta updates into a stand alone component
…ncompatible-schema-entity-level
moving details into a single chip
Adding some padding around the top and bottom
Getting tests working
…operly) Starting to stub out where the WASM calls will go Adding a Nullable typescript util
Minor renaming More work on handling name vs setting changes
config so they are not going to be like backfill Getting the cancel button working right
Starting to check the props in the forms
…ncompatible-schema-entity-level
Moving options into stand alone file Cleaning up unused values
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 made sharing stuff for auto complete harder so fixing.
src/types/jsonforms.ts
Outdated
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.
Added the documentation comments here now that we do not need to declare these multiple times
…ncompatible-schema-entity-level
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.
Releasing review comments while testing is underway.
|
||
// Schema Mode | ||
'schemaMode.header': `Source Capture Schema Mode`, | ||
'schemaMode.message': `How should the schema of the materialization binding be set.`, |
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 sentence is phrased like a question. I would prefer for it to be declarative in nature: How the schema of the materialization should be set. That said, this piece of content reads a tad awkwardly out of context.
'schemaMode.message': `How should the schema of the materialization binding be set.`, | ||
'schemaMode.input.label': `Set new bindings schemas as`, | ||
|
||
'schemaMode.error.message': `The current setting "{currentSetting}" does not match a known option. Please update or remove.`, |
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 may become a common error message for menus of this nature. We should keep an eye on how often this is repeated. The onIncompatibleSchemaChange
fields employ a similar error message.
'schemaMode.options.leaveEmpty.description': `Leave the materialization binding's schema field empty, therefore falling back to the default schema of the materialization.`, | ||
|
||
'schemaMode.options.fromSourceName.label': `From Source Name`, | ||
'schemaMode.options.fromSourceName.description': `Use the 2nd-to-last component of the collection name as the schema of the materialization binding.`, |
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.
Do you know how 2nd-to-last will be translated?
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.
Depends on the language and if they have the concept of numerical ordering.
return Object.hasOwn(schema, Annotations.oAuthProvider); | ||
}; | ||
const isOAuthConfig = (schema: JsonSchema): boolean => | ||
Object.hasOwn(schema, Annotations.oAuthProvider); |
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.
Calling out the presence of Object.hasOwn()
in the event you would like to replace it.
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.
Yeah - I think we might just end up polyfilling it possibly. Like make it the only one off. Cause it'll be easier.
// Control sourceCapture optional settings | ||
sourceCaptureTargetSchemaSupported: boolean; | ||
sourceCaptureDeltaUpdatesSupported: boolean; |
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.
Why were these pieces of state added to the bindings store? If you explained this before the holiday, would you mind jogging my memory?
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.
They are settings based on the resource config. Eventually we'll probably be adding support to mass change these settings within the bindings as well.
if (sourceCapture) { | ||
draftSpec.sourceCapture = sourceCapture; | ||
} else { | ||
delete draftSpec.sourceCapture; |
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.
Out of curiosity, do you prefer delete
to Lodash's omit
?
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.
Yeah
}); | ||
|
||
return ( | ||
<Button variant="contained" onClick={close}> |
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.
Why use the contained
variant for this Cancel button and not one of lesser weight?
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.
Copy and paste error - it is supposed to be outlined like it is today.
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.
Potential Defects
-
Enter the edit workflow for a materialization without a linked capture, click the Source from Capture CTA, select a capture table row, click the Default schema from source name switch so it is in the on position, click the Continue button, and observe that the summary chip displays an X icon next to Schema Names. This happens regardless of which switch is turn on; the summary chip does not consistently reflect the state of either (or both) settings when turned on in the aforementioned scenario. It should be noted that the summary chip does briefly show the correct state while the form is active, but is reset to the default state when the form returns to an idle state.
-
Enter the edit workflow for a materialization with a linked capture that has one,
sourceCapture
setting set, click the Source from Capture CTA, select a different capture table row, and observe that the previously linked capture row is shadow selected (i.e., greyed-out with its checkbox checked).
Additional Comments
- It does feel a little strange for the backend to cleanup
sourceCapture
properties with a default value. Presently, there is no benefit to mirroring the backend behavior here; merely wanted to share my reaction for the record.
References
Potential bug 2 | Shadow selected table row
pass the same props
to build up the settings and used the latest settings and ignore if the source capture is not set
Pushed fixes - ready for another review ad testing |
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.
Approved with minimal testing of the latest round of changes.
Issues
#1135
Changes
1135
optional settings
for the add dialogesecondary
button to the entity selector modalMisc
Tests
Manually tested
Automated tests
Playwright tests ran locally
Screenshots
Long name / wide view
Long name / narrow view