feat: persist timeline expand/collapse state in URL#184
Open
Harshil-Malisetty wants to merge 2 commits intoNetflix:masterfrom
Open
feat: persist timeline expand/collapse state in URL#184Harshil-Malisetty wants to merge 2 commits intoNetflix:masterfrom
Harshil-Malisetty wants to merge 2 commits intoNetflix:masterfrom
Conversation
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.
Description of the Change
Encodes the explicitly opened steps in the URL as a query param —
e.g. ?timeline=start,train — so shared links restore the same
timeline view for the recipient. Addresses #42.
Alternate Designs
Considered encoding full expand/collapse state for every step,
but encoding only opened steps keeps URLs shorter. Collapsed
state is the default so it doesn't need to be represented.
Considered using history.pushState but replaceState was chosen
so back button behavior stays normal — each expand/collapse
overwrites the current URL entry rather than stacking history.
Possible Drawbacks
If a run has steps with commas in the name, the param encoding
could break. Current Metaflow step names don't allow commas so
this is not a concern in practice.
Verification Process
Verified the app compiles with no errors and no lint warnings (npm run lint is clean)
after the change. logic follows existing URL param
patterns already used in the codebase.
Release Notes
Timeline expand/collapse state is now persisted in the URL,
allowing users to share links that restore the same view.