feat: snapshot endpoint share URL#339
Merged
greatest0fallt1me merged 2 commits intoJun 29, 2026
Merged
Conversation
- Add collapsible filter sections (Categories, Price, Popularity) - Persist collapsed state to localStorage via usePersistedState hook - Add ChevronIcon component for expand/collapse indicator - Implement WCAG 2.1 AA accessibility with aria-expanded/aria-controls - Add reduced motion support and responsive styling - Add comprehensive tests for collapse functionality closes CalloraOrg#254
|
@vicky4196 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
- Add snapshotUrl.ts utility for URL-based endpoint sharing - Add Share Snapshot button to generate/copy shareable URLs - Restore endpoint params from URL on page load - Add LinkIcon component for share functionality - Handle Unicode chars in params via base64 encoding closes CalloraOrg#252
ca05f9e to
9ae0d95
Compare
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.
Add 'Snapshot endpoint' export to share UI state
Summary
This PR implements a shareable URL feature that captures the current endpoint selection and parameters. Users can generate a URL snapshot of their configured endpoint with parameters and share it with others, who will see the same endpoint and parameters pre-loaded.
Changes
src/utils/snapshotUrl.ts(new)generateSnapshotUrl(basePath, snapshot)- Creates a URL with endpoint ID and base64-encoded paramsparseSnapshotUrl(search)- Parses URL to extract endpoint and params, returns null if invalidcopySnapshotUrl(basePath, snapshot)- Copies snapshot URL to clipboard for sharingsrc/ApiUsage.tsxsnapshottedstate to track copy feedbackhandleShareSnapshot()function to generate and copy snapshot URLuseEffectto restore endpoint params from snapshot URL on mountLinkIconfor the share buttonsrc/components/icons/LinkIcon.tsx(new)src/components/icons/index.tsxLinkIconsrc/index.css.share-snapshot-buttonstyles with proper spacingsrc/utils/snapshotUrl.test.ts(new)API/Visible Changes
URL Parameters
endpoint- The selected endpoint ID (e.g., "endpoint-1", "endpoint-2")params- Base64-encoded JSON of request parametersExample URL
Accessibility (WCAG 2.1 AA)
aria-labelfor screen readersaria-hiddenwhen button has accessible labelTest Output
All tests pass including:
closes #252