-
Notifications
You must be signed in to change notification settings - Fork 347
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
fix: show selections in ComparisonView on any page (ET-189) #9694
Conversation
✅ Deploy Preview for determined-ui ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9694 +/- ##
==========================================
- Coverage 53.34% 48.61% -4.73%
==========================================
Files 1255 932 -323
Lines 152723 123636 -29087
Branches 3246 3249 +3
==========================================
- Hits 81464 60102 -21362
+ Misses 71107 63382 -7725
Partials 152 152
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
given that the rest of the codebase supports both types of selections, can we do the work to support that here?
selectedExperiments?.length === 0 || selectedRuns?.length === 0 ? ( | ||
(selectedExperimentIds?.length && selectedExperiments === undefined) || | ||
(selectedRunIds?.length && selectedRuns === undefined) ? ( | ||
<Spinner /> |
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.
remember to ensure the spinner is spinning.
|
@ashtonG updated with fix for |
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
const isSelectionLimitReached = () => { | ||
if (experimentSelection) { | ||
if ( | ||
(experimentSelection.type === 'ONLY_IN' && | ||
experimentSelection.selections.length > SELECTION_LIMIT) || | ||
(experimentSelection.type === 'ALL_EXCEPT' && | ||
total && | ||
total - experimentSelection.exclusions.length > SELECTION_LIMIT) | ||
) { | ||
return true; | ||
} | ||
return false; | ||
} | ||
if (runSelection) { | ||
if ( | ||
(runSelection.type === 'ONLY_IN' && runSelection.selections.length > SELECTION_LIMIT) || | ||
(runSelection.type === 'ALL_EXCEPT' && | ||
total && | ||
total - runSelection.exclusions.length > SELECTION_LIMIT) | ||
) { | ||
return true; | ||
} | ||
return false; | ||
} | ||
return false; | ||
}; |
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'm wondering if it's worth doing this vs just looking at the pagination information we get back from the endpoint, especially because the selection object could theoretically contain ids that are no longer in the project.
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.
ah, that makes sense, will change this to a state boolean that's set based on pagination.total
in searchRuns
/searchExperiments
response.
Ticket
ET-189
Description
Even if selected experiments/runs are not loaded on the current page, the Compare panel should still fetch data for them.
Test Plan
On Experiments List page (with "New Experiment List" feature flag on):
On Runs List page (with "Flat Runs View" feature flag on):
Checklist
docs/release-notes/
See Release Note for details.