[OGUI-1917] Add shareable url button - #3586
Draft
isaachilly wants to merge 7 commits into
Draft
Conversation
Add a new share action to the toolbar that copies a URL for the current view (path + active query params) to the clipboard and displays a notification on success/error.
Add new tests to verify successful clipboard copying and correct error handling when the Clipboard API is missing or fails.
Replace manual per-field encoding in LogFilter with a single encodeURIComponent call on the full JSON query string in the router.
The share button now copies `window.location.href` directly instead of rebuilding the URL from parsed query params. This ensures the copied link exactly matches what the user sees in the address bar. Tests updated to validate exact URL copying, proper percent-encoding/round-trip of filters, and remove redundant test.
The `+` matched a run of consecutive quotes and collapsed it to a single escaped quote/ A backslash was encoded to `%5C` so JSON.Stringify saw nothing to escape. URLSearchParams then decoded it back to `\` and JSON.parse read it together with the character after it so something like `C:\temp` would be returned as `C:<tab>emp`. Both follow escaping before encoding, whilst JSON.parse runs only following the router's URLSearchParams decoding, unsymmetrical. Now that we encode the whole `q` parameter, this per-value pass is redundant and actively harmful, so it is removed.
Update expected URL params to use fully percent-encoded form.
Extend the InfoLogger filter action suite with a dedicated URL round-trip section. The new tests verify message filter values survive reloads across tricky cases (double quotes, valid/invalid backslash escapes, multiline input, and URL-special characters), and assert the model keeps unencoded values internally.
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.
I have JIRA issue created