-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Full entity refresh start (not live) (#1257)
* adding back in the data flow reset stuff defaulting to true making sure we only show the review when there are backfills * Moving away from chip list to a drop down as that is more usable * Fixing some typing on auto completes Updating store with target value Controlling continue button * wiring up passing around settings cleaning up logging ordering props to make them a bit more readable * Making shared function for disabling * Creating a handler hook for processing update * Handling "empty" value * Moved the pop up to a stand alone dialog to keep things simpler. This new flow is complex enough trying to work it into existing code was just too much. Saving off the live spec we check if it exists to show review Starting to flesh out the data flow dialog Renaming in case we move away from a "modal" approach * moving buttons to the bottom * Language tweaks adding where logs will be * Adding fitwidth to alerts so we don't have to keep wrapping it * Using the fitWidth prop * Disabling the editor when backfill data flow is enabled Showing alert informing user why the editor is disabled * Do not want the dialog closing when clicking outside of it accidentally * Adding missing keywords * typing passing entire option to make life easier * This should close when selected as you can only select one * The default should be only on multiples and not the root setting * Okay so this is A LOT. But overall all this is doing is taking the work that was previously committed and breaking it up a little. The idea here is similar to how tables store columns. * Some renaming to remove `Step` from names * Commenting out work so this stuff can be merged now * Removing the onClick stuff from the chips * Commenting out alert * cleaning up logging * don't need to save right now * noting work * Adding error handling * notes on the data * PR: cleaning up spread that is no longer needed * pr: typos * PR: typing * PR: typing * Removing needless type
- Loading branch information
1 parent
d014e0d
commit a4c4b02
Showing
46 changed files
with
862 additions
and
203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 0 additions & 19 deletions
19
src/components/shared/Entity/DataflowResetModal/BindingReview.tsx
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
src/components/shared/Entity/hooks/useDataFlowResetHandler.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { createPublication } from 'api/publications'; | ||
import { useEditorStore_id } from 'components/editor/Store/hooks'; | ||
import { useCallback } from 'react'; | ||
import { useBindingStore } from 'stores/Binding/Store'; | ||
import { generateDisabledSpec } from 'utils/entity-utils'; | ||
|
||
function useDataFlowResetHandler() { | ||
const [backfillDataFlowTarget] = useBindingStore((state) => [ | ||
state.backfillDataFlowTarget, | ||
]); | ||
|
||
const draftId = useEditorStore_id(); | ||
|
||
return useCallback(async () => { | ||
console.log('Starting'); | ||
|
||
// Capture - Disable | ||
generateDisabledSpec({}, false, false); | ||
|
||
// Capture - Publish | ||
const publishResponse = await createPublication(draftId, false); | ||
if (publishResponse.error) { | ||
console.log('publishResponse.error', publishResponse.error); | ||
// return failed(publishResponse); | ||
} | ||
|
||
// waitForPublishToFinish(publishResponse.data[0].id, false); | ||
|
||
// Runtime must stop 100% and is done writing documents (wait for publication to succeed and then wait… or keep looking for shards) | ||
// (IMPORTANT) - save current time | ||
// Bindings - update backfill property | ||
// Capture - enable | ||
// Materialization - update notBefore property | ||
// Capture & Materialization - Publish | ||
|
||
console.log('backfillDataFlowTarget', backfillDataFlowTarget); | ||
}, [backfillDataFlowTarget, draftId]); | ||
} | ||
|
||
export default useDataFlowResetHandler; |
45 changes: 0 additions & 45 deletions
45
src/components/shared/Entity/hooks/useDataFlowResetPrompt.tsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.