Commit dca1819
authored
Linked Time: Move step selector to redux part 4 - Update scalar_card to read from redux (#6240)
~Blocked by #6241~
~Blocked by #6254~
~Blocked by #6262~
## Motivation for features / changes
There are a variety of issues caused by cards storing their step
selection state without passing it to redux.
1) Pinned versions of cards lose their step selection
2) Adding another card using the comparison view resets all step
selections
3) Shareable links cannot contain step selection information
The time selection is actually derived from a handful of other settings
* Linked Time Enabled + Linked Time Selection
* Step Selection Enabled
* Range Selection
* Min/Max step contained within a card
* Min/Max step that a user has set (by zooming, modifying the axis, etc)
* The actual step selection value stored in the card
Historic PRs
* In #6172 I modified the redux state to ensure all these values can be
stored in redux
* In #6234 and #6236 I started storing the step selection and minMax in
redux
* In #6230 I updated the new selectors to account for the changes made
in #6175 and add the ability to fully derive step selector values at the
selector level.
This is the final pr in this saga. It updates the scalar card to READ
from the new redux state.
## Technical description of changes
There are a variety of `null` check updates that need to be updated to
account for `undefined` states.
Now that almost all of the logic lies in the redux level a lot of logic
can be removed from the scalar_card_container.
## Screenshots of UI changes
Using the step selector

Pinning a card with a step selection

A scalar card with a step selection next to one without

A scalar card with step selection disabled (while global step selection
is enabled)

A scalar card with range selection disabled while global range selection
is enabled

## Detailed steps to verify changes work correctly (as executed by you)
While there are a few new tests added, the majority of this PR is
actually updating existing tests as each piece of the underlying
functionality is already fairly well tested.
1) Start tensorboard
2) Navigate to localhost:6006
3) Find two scalar cards
4) Enable step selection on one via the perspective fob
5) Assert it is not enabled on the other
6) Assert global step selection is not enabled
7) Add a second fob to the card
8) Repeat steps 5-7
9) Remove one of the fobs and enable global step selection
10) Assert a step selector appears on the other card
11) Enable global range selection
12) Assert two fobs now exist on both cards
13) Pin a card
14) Assert the pinned copy has the same step selection
## Alternate designs / implementations considered1 parent 5f44f55 commit dca1819
File tree
4 files changed
+214
-576
lines changed- tensorboard/webapp/metrics/views/card_renderer
4 files changed
+214
-576
lines changedLines changed: 5 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
97 | | - | |
| 96 | + | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
| 241 | + | |
245 | 242 | | |
246 | 243 | | |
247 | 244 | | |
248 | 245 | | |
249 | 246 | | |
250 | | - | |
251 | | - | |
| 247 | + | |
| 248 | + | |
252 | 249 | | |
253 | 250 | | |
254 | 251 | | |
| |||
0 commit comments