Commit 29850f6
authored
[Global Pins] Saves all currently pinned cards if the user has enabled global pins. (#6848)
## Motivation for features / changes
Feature request during the teamfood: `Clicking disable pins -> pinning a
card -> clicking enable pins` doesn't save the currently pinned card. It
seems reasonable to save all currently pinned cards when the setting is
activated.
This PR saves all currently pinned cards when user clicks enable global
pins.
## Technical description of changes
* 97c6324 Added `saveScalarPins` to the
data source
* c6be93b Modified `addOrRemovePinsOnToggle` logic to include adding
pins logic
* Previously, if a user disabled the global pin feature, all pins would
be removed.
* This PR added logic that will cause all currently pinned cards to be
saved to local storage when the user activates the feature.
## Screenshots of UI changes (or N/A)
N/A
## Detailed steps to verify changes work correctly (as executed by you)
Unit test passes
## Alternate designs / implementations considered (or N/A)
N/A1 parent d4c5c82 commit 29850f6
File tree
5 files changed
+92
-22
lines changed- tensorboard/webapp/metrics
- data_source
- effects
5 files changed
+92
-22
lines changedLines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
33 | 43 | | |
34 | 44 | | |
35 | 45 | | |
| |||
Lines changed: 31 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
100 | 130 | | |
101 | 131 | | |
102 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
356 | 357 | | |
357 | 358 | | |
358 | 359 | | |
359 | | - | |
| 360 | + | |
360 | 361 | | |
361 | 362 | | |
| 363 | + | |
362 | 364 | | |
363 | 365 | | |
364 | 366 | | |
365 | 367 | | |
366 | 368 | | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
| 369 | + | |
| 370 | + | |
376 | 371 | | |
377 | | - | |
378 | | - | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
379 | 383 | | |
380 | 384 | | |
381 | 385 | | |
| |||
427 | 431 | | |
428 | 432 | | |
429 | 433 | | |
430 | | - | |
| 434 | + | |
431 | 435 | | |
432 | 436 | | |
433 | 437 | | |
| |||
Lines changed: 32 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
1061 | 1062 | | |
1062 | 1063 | | |
1063 | 1064 | | |
1064 | | - | |
| 1065 | + | |
1065 | 1066 | | |
| 1067 | + | |
1066 | 1068 | | |
1067 | 1069 | | |
1068 | 1070 | | |
1069 | 1071 | | |
1070 | 1072 | | |
1071 | 1073 | | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
1072 | 1092 | | |
1073 | 1093 | | |
1074 | 1094 | | |
1075 | 1095 | | |
1076 | 1096 | | |
1077 | | - | |
| 1097 | + | |
1078 | 1098 | | |
1079 | 1099 | | |
1080 | 1100 | | |
| 1101 | + | |
1081 | 1102 | | |
1082 | 1103 | | |
1083 | | - | |
1084 | | - | |
| 1104 | + | |
| 1105 | + | |
1085 | 1106 | | |
1086 | 1107 | | |
1087 | 1108 | | |
1088 | 1109 | | |
| 1110 | + | |
1089 | 1111 | | |
1090 | 1112 | | |
1091 | 1113 | | |
1092 | | - | |
1093 | | - | |
| 1114 | + | |
| 1115 | + | |
1094 | 1116 | | |
1095 | 1117 | | |
1096 | 1118 | | |
1097 | 1119 | | |
1098 | 1120 | | |
| 1121 | + | |
1099 | 1122 | | |
1100 | 1123 | | |
1101 | | - | |
1102 | | - | |
| 1124 | + | |
| 1125 | + | |
1103 | 1126 | | |
1104 | 1127 | | |
1105 | 1128 | | |
1106 | 1129 | | |
1107 | 1130 | | |
| 1131 | + | |
1108 | 1132 | | |
1109 | 1133 | | |
1110 | 1134 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
422 | 422 | | |
423 | 423 | | |
424 | 424 | | |
| 425 | + | |
| 426 | + | |
425 | 427 | | |
426 | 428 | | |
427 | 429 | | |
| |||
0 commit comments