Persist timeline expand/collapse state in URL#183
Open
rawadhossain wants to merge 1 commit intoNetflix:masterfrom
Open
Persist timeline expand/collapse state in URL#183rawadhossain wants to merge 1 commit intoNetflix:masterfrom
rawadhossain wants to merge 1 commit intoNetflix:masterfrom
Conversation
|
nice implementation, I had a similar approach in #184 but I see you used useTaskListSettings which is much cleaner since it follows the existing URL param pattern in the codebase. the Cypress tests is a good call as well |
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.
The timeline view's expand/collapse state was not reflected in the URL, making it impossible to share a view showing a specific set of tasks. Recipients would always see the default expanded state instead of what the sharer was viewing.
This PR adds an
open_stepsquery parameter that persists the expand/collapse state of timeline steps in the URL.Closes #42
Behavior
Changes
useTaskListSettings.ts— Addedopen_stepsas a URL query param viause-query-params. Excluded from custom mode localStorage presets.RunPage.tsx— SingleuseEffectwith phase tracking: applies URL state on initial load, syncs state URL on user toggle. UsesreplaceInso expand/collapse actions don't create browser history entries.cypress/integration/run_details.js— Extended existing collapse tests with 3 new assertions foropen_stepsURL behavior.PluginRegisterSystem.tsx(additional fix) — Fixed a pre-existing crash when the/pluginAPI returns a response instead of a plain array. This was blocking local development and was fixed while working on this PR.Screenshots
Steps collapsed -

open_stepsparam in URLSteps expanded -

paramremoved from URLVideo Demo
test.mp4
Edge Cases Handled
open_steps=(empty), these are treated differently