Card Interactions: Add redux logic store and retrieve card suggestions#6437
Draft
rileyajones wants to merge 3 commits intotensorflow:masterfrom
Draft
Card Interactions: Add redux logic store and retrieve card suggestions#6437rileyajones wants to merge 3 commits intotensorflow:masterfrom
rileyajones wants to merge 3 commits intotensorflow:masterfrom
Conversation
17a28b7 to
dad33c2
Compare
dad33c2 to
4597dc5
Compare
rileyajones
added a commit
that referenced
this pull request
Sep 14, 2023
…to localStorage (#6439) ## Motivation for features / changes We are working on a feature to suggest cards to users at the top of the timeseries dashboard. Suggestions are generated based on previous interactions with TensorBoard. In order to determine what those previous interactions were we are storing them to localStorage. See #6437 for more information. Googlers see [go/tb-suggested-cards](go/tb-suggested-cards)
822e33a to
8fe4946
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.