-
Notifications
You must be signed in to change notification settings - Fork 29
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 row selection (duplicate experiments) #3921
Conversation
This PR highlights a bigger problem. Having duplicate entries in the table is going to lead to some unexpected behaviour. For example selecting a single record for plotting adds duplicate entries into the Screen.Recording.2023-05-18.at.9.54.29.am.mov☝🏻 I'll fix this right now. I think the behaviour for the checkboxes makes sense but doing things like starring/deleting etc should update entries for that record. |
const [firstCell, ...cells] = getVisibleCells() | ||
const isWorkspace = id === EXPERIMENT_WORKSPACE_ID | ||
const changesIfWorkspace = isWorkspace ? changes : undefined | ||
|
||
const { toggleRowSelected, selectedRows } = useContext(RowSelectionContext) | ||
|
||
const isRowSelected = !!selectedRows[id] | ||
const isRowSelected = !!selectedRows[getCompositeId(id, branch)] |
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.
[Q] Should we call this rowId
and put it on the experiment data?
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.
It was more complicated doing that as it needs to be added everywhere and it's only useful for row selection (something happening on the webview side only).
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.
Good work!
Code Climate has analyzed commit aa7bd4e and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (85% is the threshold). This pull request will bring the total coverage in the repository to 95.0% (0.0% change). View more on Code Climate. |
For #1966
Screen.Recording.2023-05-17.at.3.51.02.PM.mov