Card Interactions: Add redux logic store and retrieve card suggestions #6437
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.
Motivation for features / changes
We are working on a new feature to suggest cards to a user based on their previous interactions with TensorBoard.
This is just the initial change adding the redux logic. Another pr will follow this shortly adding the display.
For Googlers see go/tb-suggested-cards
See #6436 for the feature flag being added.
Technical description of changes
Screenshots of UI changes (or N/A)
When the UI is added it will look something like this.
Alternate designs / implementations considered (or N/A)
Rather than adding two state attributes I could have only added one and relied on newly written events being stored to localStorage. I found this approach to be cleaner as it limited the amount of places the code had to communicate with localStorage.
The number of cards being displayed is arbitrarily limited to 10, with the additional arbitrary constraints of 3 based on tag filters, and 3 based on clicks.