Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document Access Feature (Public Links) – Client Side Refactoring #217

Open
mahid797 opened this issue Feb 23, 2025 · 0 comments
Open

Document Access Feature (Public Links) – Client Side Refactoring #217

mahid797 opened this issue Feb 23, 2025 · 0 comments
Assignees
Labels
Core Work to do on the core system of the App Frontend Frontend Related Issue ⚡Important High-impact issue that needs to be resolved before the next release New Feature New feature to be implemented Refactor Code Improvement
Milestone

Comments

@mahid797
Copy link
Collaborator

mahid797 commented Feb 23, 2025

Refactor the current /links/[linkId] feature into a clearer, maintainable, and future-proof “Document Access” flow, fully aligned with the new server-side JSON-based visitorFields and potential name/email columns. The refactoring will improve code organization, add Tanstack Query usage for data fetching, and introduce a more flexible approach to collecting visitor data and handling analytics (views/downloads).

Overview

  • Migrate from links/[linkId] to documentAccess/[linkId], renaming files and reorganizing the directory.
  • Implement a “Confirm” page with disclaimers.
  • Create a new main AccessPage.tsx that fetches link details via Tanstack Query.
  • Introduce dynamic visitor fields (from JSON) in VisitorInfoModal.tsx.
  • Allow inline PDF viewing in a global PDFViewer.tsx.
  • Track analytics (e.g., direct access or download events).

Key Note

The server only stores minimal keys or booleans for which visitor fields are requested. Labels or “required” flags do not reside in the DB. The client references src/shared/config/visitorFieldsConfig.ts to render form fields, ensuring any additional columns (like name/email) or dynamic fields remain consistent.


Sub-Issues

  1. Directory & Naming Overhaul #221
  2. Hooks & Tanstack Query Integration #222
  3. Confirm Page & Main Access Flow #223
  4. VisitorInfoModal, Inline PDF, & Analytics #224

References

📄 Note:
It is strongly recommended to read through all related issues (both Server Side and Client Side) before beginning development to ensure a full understanding of the scope, dependencies, and overall feature flow. This will help avoid redundant work and ensure consistency across all components.

@mahid797 mahid797 added Core Work to do on the core system of the App Frontend Frontend Related Issue New Feature New feature to be implemented Refactor Code Improvement ⚡Important High-impact issue that needs to be resolved before the next release labels Feb 23, 2025
@mahid797 mahid797 added this to the v0.1 milestone Feb 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Work to do on the core system of the App Frontend Frontend Related Issue ⚡Important High-impact issue that needs to be resolved before the next release New Feature New feature to be implemented Refactor Code Improvement
Projects
None yet
Development

No branches or pull requests

2 participants