Open
Conversation
Refactor not found components to use a common handleReturn function for navigation.
Remove console log for history length in TaskNotFoundComponent.
Added a new 'Return to Previous Page' button with smart fallback navigation.
Updated link for 'Return to Previous Page' button feature.
Updated the link for the 'Return to Previous Page' button in the changelog.
Updated the pull request link in the changelog.
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.
Abstract
Fixes #10292
When applying a filter, search, or sort on the Tasks page, the browser history entry was being replaced (
history.replace) instead of pushed. This meant the Back button would navigate away from the Tasks page entirely instead of restoring the previous filter state.Changes
tasks-page.tsx: Introduced asetQuerycallback (mirroring the pattern from the Jobs page, Flattening job list on a task page #10217) that:history.pushwhenfilter,search, orsortchanges — soeach filter change creates a new history entry and Back restores it.
history.replacewhen onlypage/pageSizechanges — paginationdoes not pollute the history stack.
useEffecton[updatedQuery, query, isMounted]to re-fetch tasks when the URL changes (e.g., via Back/Forward navigation), keeping data in sync with the URL.onApplyFilter,onApplySearch,onApplySorting,Pagination.onChange) now route throughsetQueryinstead of dispatching directly.Testing
restored and the task list should update accordingly.
Related
backbutton in browser should apply previous filter state #10292