Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Changes reorder column events to use source and destination #6733
Changes reorder column events to use source and destination #6733
Changes from all commits
89fc04a
bed9604
9eef734
f72b2a2
f3130d0
a9c53c3
f17fe22
555a84e
ec93a93
cff6ce3
62f4099
e96b32a
8f4a38b
4bd7dcd
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Previously the headers were retrieved from the action, now they are being retrieved from the current state. How can the headers ever change?
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.
To clarify:
dataTableColumnEdited
is currently only used for reorderingrunsTableHeaderAdded
,runsTableHeaderOrderChanged
)To prevent confusion (and for consistency) I'll change
dataTableColumnEdited
->dataTableColumnOrderChanged
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.
(a separate
dataTableColumnAdded
action will be added in an upcoming PR)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.
In that case can you
headers
from the props?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.
Wait sorry - I need to correct myself. I did add a
dataTableColumnAdded
in #6737, but it's unused because we don't actually have a feature for adding standard columns, only hparam columns. Thus, only the hparams actiondashboardHparamColumnAdded
will be used to add new columns.Regarding passing
headers
to the props, I propose that an action signature like dashboardHparamColumnAdded, i.e. only specifying {column, nextTo, side} and letting the reducer figure out how put it in the right place, is more in line with redux best practices, which advocate putting logic in reducers, not components; passing in headers via the action implies that the component must do some data manipulation first.(Note that the previously implemented runs table add action already uses the "put logic in reducers" pattern, albeit with a slightly different signature.)
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 fully agree with everything in this statement.
The thing that I find confusing is that the action dataTableColumnEdited takes HeaderEditInfo as props which has an unused attribute
headers