-
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
Enable setting the backfill counter of all task bindings with a single action #965
Conversation
src/components/editor/Bindings/Backfill/useUpdateBackfillCounter.ts
Outdated
Show resolved
Hide resolved
@@ -443,7 +446,7 @@ const getInitialState = ( | |||
}, | |||
|
|||
prefillBackfilledCollections: (liveBindings, draftedBindings) => { | |||
const { addBackfilledCollection } = get(); | |||
const { addBackfilledCollections } = get(); |
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 are we having this stand alone function that loops through all the bindings?
We are already calling prefillResourceConfig
right before calling this which means we loop through all the bindings twice in a row.
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.
Would you like to conflate the scope of prefillResourceConfig
?
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 - as best we can I would like that big initial looping to only be done once if possible.
src/components/editor/Bindings/Backfill/useUpdateBackfillCounter.ts
Outdated
Show resolved
Hide resolved
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.
Some call outs. All of `em do not need handled right now. I think the ones that need handled I marked with a ❤️
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.
lgtm
tested a bit and seemed alright with 1k collections
Issues
The issues directly below are completely resolved by this PR:
#962
The issues directly below are advanced by this PR:
#973
Changes
962
The following features are included in this PR:
Add a Backfill section directly above the bindings selector in edit workflows that contains a header, short description, and an outlined, toggle button with the label Backfill. This button should have the same styling as the binding-specific Backfill button.
Update the backfill counter of applicable, drafted bindings when the new backfill button is clicked. The toggle button state triggers are as follows:
Disabled: the button will be in a disabled state when an asynchronous task that updates the server is in progress and when the drafted specification does not contain at least one enabled binding.
Deselected: the button will be in a deselected state by default and when the backfill counter of any drafted binding has not been incremented in the editing session.
Selected: the button will be in a selected state when the backfill counter of all drafted bindings have been incremented in the editing session.
NOTE: The backfill counter of a drafted binding does not need to be reset if the binding is disabled post-incrementation in the editing session.
973
The following features are included in this PR:
OutlinedToggleButton
.Tests
Manually tested
Automated tests
N/A
Screenshots
Capture edit | Bindings enabled | Backfill unset
Capture edit | Bindings enabled | Backfill set
Capture edit | Bindings disabled
Materialization edit | Bindings enabled | Backfill unset
Materialization edit | Bindings enabled | Backfill set
Materialization edit | Bindings disabled
Disabled primary colored outlined toggle button