Draft: feat: Add Shareable Record URLs
DESCRIPTION
This Merge Request adds a dedicated Record Detail View and a Public Sharing feature. Users can now click on any record to be redirected to a detailed view page showing all associated descriptions and metadata.
Additionally, this page includes a Share button that generates a temporary, unauthenticated URL via the existing backend, allowing for easy external distribution of specific record data. Problem Statement
Currently, record details are difficult to view in depth without a dedicated page. Furthermore, sharing specific record information with external collaborators requires manual data extraction or account creation, which hinders the workflow for non-authenticated users. Proposed Solution
-
Dedicated Detail Page: Redirects users from the record list to a comprehensive view of all record details.
-
Share / Link Action: A prominent button on the detail page that calls the record_url endpoint.
-
Public Access: Enables read-only viewing of that specific detail page without requiring a Swecha login.
User Flow:
-
Navigate to the Records list.
-
Click on a Record: System redirects user to a new dedicated Detail Page.
-
View Details: All descriptions and metadata for that specific record are visible.
-
Click Share Button: Located on the side/action bar of the detail page.
-
Copy URL: A temporary URL is generated for the user to share.
In Scope
-
New Routing/Page for Record Details.
-
UI components to display full record descriptions.
-
Share button integration on the Detail Page.
-
Integration with the existing record_url generation logic.
-
Unauthenticated access handling for the shared view.
Out of Scope:
-
Editing records from the public link.
-
Modifying existing record list filters.
Creating new backend endpoints.
Implementation Phases:
Phase 1 – Detail Page: Create the new route and page component to display all record fields.
Phase 2 – Redirection: Update the Records list to link to the new Detail Page.
Phase 3 – Share Functionality: Add the "Share" button and connect it to the URL generation API.
Phase 4 – Public Route: Ensure the detail page can render in a "Read-Only/Public" mode when accessed via a shared link.
How to Test:
-
Go to the Records tab.
-
Click on any record and ensure it redirects to the new detail page.
-
Verify all descriptions and details are rendered correctly.
-
Click the Share button and copy the generated link.
-
Paste the link into a Private/Incognito window.
-
Confirm the record details are visible without logging in.
Acceptance Criteria:
[ ] Record click redirects to a new page (/records/:id).
[ ] Detail page displays all relevant record metadata/descriptions.
[ ] Share button successfully generates a temporary link.
[ ] Shared link is accessible without authentication.
[ ] UI provides feedback (e.g., "Link copied") when the button is clicked.
Looking forward to your review & feedback!
Thanks!