You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds redux code for displaying shared hparam columns in the Time Series page (#6727)
## Motivation for features / changes
Required redux edits for displaying hparams in time series.
## Technical description of changes
Adds a new property to HparamsState, `dashboardDisplayedHparamColumns`
to represent the columns shown across the time series page (similar in
concept to the existing `dashboardFilters`)
Adds four actions for hparam column manipulation:
- dashboardHparamColumnAdded
- dashboardHparamColumnRemoved
- dashboardHparamColumnToggled
- dashboardHparamColumnOrderChanged
and reducer logic to handle these events.
Note that the add actions cannot simply pass the header index in this
case as the table components will not have knowledge of the relative
index of hparam columns. The actions instead specify the column to
insert next to and the side, and the indices are computed from within
the reducer (this can be seen as simply moving the index computation
from the component to the reducer, which better conforms to
https://redux.js.org/style-guide/#put-as-much-logic-as-possible-in-reducers
)
Also exports required types from widgets/data_table - these will be also
used by the runs and metrics tables the following PRs
## Detailed steps to verify changes work correctly (as executed by you)
- Unit tests pass
## Alternate designs / implementations considered (or N/A)
An alternative is to duplicate the hparams state across the runs and
scalar card tables as RunsDataState.runsTableHeaders and
MetricsState.singleSelectionHeaders/MetricsState.rangeSelectionHeaders,
but this would either incur massive complications in syncing the various
column operations (add/remove/hide/sort) or alternatively, would force
the user to duplicate operations multiple times to get the hparams
columns in sync. The chosen design also aligns with [keeping state
minimal](https://redux.js.org/style-guide/#keep-state-minimal-and-derive-additional-values).
0 commit comments