forked from tensorflow/tensorboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
time-namespaced state: Improve how we decide when to rehydrate state …
…from URL. (tensorflow#5549) There are some browser history navigations where we were not appropriately rehydrating URL state. The root cause was that we were only rehydrating URL state at most one time for each namespace. But, in reality, we might need to do it multiple times: one time for the experiment list view and another time for the dashboard view. (Googlers, see internal bug b/216829997). This change fixes the issue by adding another dimension when determining whether we can rehydrate URL state. The dimension is based on `RouteKind` but actually represented by a new `DeepLinkGroup` enum. The mapping of `RouteKind` to `DeepLinkGroup` is explicitly defined in the app routing code: * `DeepLinkGroup.EXPERIMENTS` = `[RouteKind.EXPERIMENTS]` * `DeepLinkGroup.DASHBOARD` = `[RouteKind.EXPERIMENT, RouteKind.COMPARE_EXPERIMENT]` I considered making `DeepLinkGroup` (or some equivalent) a per-app configuration, either in the route configurations or in the `DeepLinkProvider` interface. But after playing around with these ideas, I realized the API and code would be quite messy for little gain. Besides, we don't currently see a world where the `DeepLinkGroup` definition differs between different versions of Tensorboard. I also renamed `knownNamespaceIds` to `rehydatedDeepLinks` to make the purpose clearer and narrower.
- Loading branch information
Showing
11 changed files
with
263 additions
and
66 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.