feat: Add copy link button and remove all params from url bar - #1572
Merged
arielvino merged 15 commits intoMay 20, 2026
Conversation
Replaces the automatic URL↔state sync with an explicit Share button in
the header that builds a shareable link on demand and copies it to the
clipboard. The URL is never polluted with params during normal navigation.
- Remove the useEffect that continuously wrote SearchContext state back
into the address bar (the main source of the "mostly broken" URL sync)
- Add ShareButton (extracted to its own file) with a link icon, tooltip
showing the URL to be copied, and a ✓ confirmation on click
- Build page-aware URLs: each route declares only the params it actually
uses (e.g. /gaps gets timestamp+operator+line+route, /map gets only
its datetime, homepage gets nothing)
- Capture URL params synchronously via useMemo before stripping them,
exposed through InitialUrlParamsContext so lazy-loaded pages can read
them reliably even after the address bar has been cleaned up
- Apply incoming URL params on top of existing session storage so shared
links always restore the correct state regardless of prior session
- Fix /gaps_patterns not restoring startDate/endDate and operatorId from
shared links
- Fix /map not restoring its timestamp from shared links
- Fix /operator clearing lineNumber/routeKey on mount (removed the
setSearch reset that wiped cross-page state)
- Add share_link translation key (he/en/ar/ru)
…ring sanitization' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Contributor
Collaborator
Author
|
@claude Check why applitools tests from this group that don't have component name are always on branch HEAD. |
arielvino
deleted the
Add-copy-link-button-and-remove-all-params-from-URL-bar
branch
May 20, 2026 06:02
This was referenced May 22, 2026
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
Added a button that copy the url to the current page with all ui-state params to clipboard.
It use SearchState params when exists - and manually add params that not tracked in the shared state when needed.
The generated url does NOT contain the language code - which means the page will be loaded on the recipient's machine in the language that was defined there.
(For new users - the PR #1558 once approved will make the site auto detect local language)
The URL bar now show cleanly without any params on any page.
The gaps page still link with params to the singleLineMap - but those params are strriped from the URL after being proccessed.
Translation to all 4 languages was added (though the Russian and Arabic are here are AI generated, a speaker should verify those).
screenshots