-
Notifications
You must be signed in to change notification settings - Fork 357
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
chore: run bulk action interstitial component #9390
chore: run bulk action interstitial component #9390
Conversation
✅ Deploy Preview for determined-ui ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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 wasnt sure how to use the modal on local, i'll reach out to you tomorrow
@@ -6,7 +6,7 @@ import { useCallback, useEffect } from 'react'; | |||
export type onInterstitialCloseActionType = (reason: 'ok' | 'close' | 'failed') => void; | |||
|
|||
interface Props<T> { | |||
onCloseAction: (reason: 'ok' | 'close' | 'failed') => void; | |||
onCloseAction: onInterstitialCloseActionType; |
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.
oops, nice improvement!
webui/react/src/components/RunFilterInterstitialModalComponent.test.tsx
Outdated
Show resolved
Hide resolved
webui/react/src/components/RunFilterInterstitialModalComponent.test.tsx
Outdated
Show resolved
Hide resolved
const { lastCall } = vi.mocked(searchRuns).mock; | ||
const filterFormSetString = lastCall?.[0].filter; | ||
expect(filterFormSetString).toBeDefined(); | ||
const filterFormSet = JSON.parse(filterFormSetString || ''); |
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.
can we add type here? prob FilterFormSetWithoutId
?
const onCloseAction = vi.fn(); | ||
userEvent.setup(); | ||
|
||
const view = render( |
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.
super nit: can we get rid of view
?
); | ||
|
||
return ( | ||
<InterstitialModal.Component |
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.
qq: this does not show the modal like the one in the ticket, right? will the modal be implemented in this PR?
export interface Props { | ||
projectId?: number; | ||
selection: SelectionType; | ||
filterFormSet: FilterFormSetWithoutId; |
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.
FormSet
doesn't have a function to return FilterFormSetWithoutId
directly. can we use FilterFormSet
because it's easier to pass it? but that will affect testing data...
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature/actions-flat-run-table #9390 +/- ##
==================================================================
+ Coverage 48.61% 49.28% +0.66%
==================================================================
Files 1235 1238 +3
Lines 159575 159804 +229
Branches 2810 2851 +41
==================================================================
+ Hits 77574 78754 +1180
+ Misses 81827 80878 -949
+ Partials 174 172 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
9aa0224
to
42c5b29
Compare
42c5b29
to
bc9d056
Compare
bc9d056
to
368958d
Compare
763becb
to
6919563
Compare
this adds an interstitial component for run bulk actions. when opened, it runs a search given the current selection and filters and determines whether or not the selection contains any runs that are part of a search, returning the results to the opener. as a side effect, we pull out the `mergeAbortControllers` helper from `trialDetailsLogs` while also adding test coverage to that helper.
Co-authored-by: Keita Fish <[email protected]>
a7226a0
to
31a4aec
Compare
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
The usage of this is
- call
RunFilterInterstitialModalComponent
first - get the close reason
- if statement
- show
RunMoveWarningModalComponent
whenhas_search_runs
is returned - show move modal when
no_search_runs
is returned without showingRunMoveWarningModalComponent
- show error message when
failed
is retuend
- show
is that correct?
i think we should show the move modal first -- that way we defer the check until after the user confirms the details of the move. |
got it. if its ready to get merged, could you merge it to work on the move action? |
faf66e2
into
feature/actions-flat-run-table
Co-authored-by: Keita Fish <[email protected]>
Co-authored-by: Keita Fish <[email protected]>
Co-authored-by: Keita Fish <[email protected]>
Co-authored-by: Keita Fish <[email protected]>
Co-authored-by: Keita Fish <[email protected]>
Co-authored-by: Keita Fish <[email protected]>
Co-authored-by: Keita Fish <[email protected]>
Co-authored-by: Keita Fish <[email protected]>
Co-authored-by: Keita Fish <[email protected]>
Co-authored-by: Keita Fish <[email protected]>
Co-authored-by: Keita Fish <[email protected]>
Ticket
ET-94
Description
this adds an interstitial component for run bulk actions. when opened, it runs a search given the current selection and filters and determines whether or not the selection contains any runs that are part of a search, returning the results to the opener. as a side effect, we pull out the
mergeAbortControllers
helper fromtrialDetailsLogs
while also adding test coverage to that helper.Test Plan
Component is not currently user-facing. Unit tests should comprehensively check functionality.
Checklist
docs/release-notes/
.See Release Note for details.