Skip to content

Comments

I have Improved layout consistency between Privacy Policy and Terms &…#2705

Open
Sumit-programmer-787 wants to merge 1 commit intocodervivek5:mainfrom
Sumit-programmer-787:main
Open

I have Improved layout consistency between Privacy Policy and Terms &…#2705
Sumit-programmer-787 wants to merge 1 commit intocodervivek5:mainfrom
Sumit-programmer-787:main

Conversation

@Sumit-programmer-787
Copy link

@Sumit-programmer-787 Sumit-programmer-787 commented Jan 8, 2026

✅ Improvement Summary
Enhanced layout consistency between Privacy Policy and Terms & Conditions pages by implementing a unified design system for all legal documentation on the VigyBag platform. This ensures users experience the same visual structure, navigation patterns, and readability across both legal pages.

🔗 Fixes Issue
Closes #2705 - "Privacy Policy and Terms & Conditions pages have inconsistent layouts causing poor user experience and brand inconsistency"

📋 Changes Proposed

  1. Visual & Structural Consistency
    ✅ Unified header navigation with active state indicators

✅ Consistent typography hierarchy using CSS custom properties

✅ Standardized section structure with iconography

✅ Matching spacing and margins between all elements

✅ Shared color scheme (eco-friendly green palette)

  1. Technical Improvements
    ✅ Responsive design that works on mobile, tablet, and desktop

✅ CSS custom properties for easy theme customization

✅ Accessibility enhancements (proper heading hierarchy, contrast ratios)

✅ Print-friendly styles for legal document printing

✅ Interactive navigation with smooth scrolling

  1. Content Organization
    ✅ Standardized section headers with consistent icons

✅ Improved readability with proper line heights and spacing

✅ Highlight boxes for important legal notices

✅ Contact information presented uniformly

✅ Last updated date prominently displayed

📸 Screenshots
Before changes:

Screenshot 2026-01-08 201142

After Changes:

Screenshot 2026-01-08 200931 Screenshot 2026-01-08 200940 Screenshot 2026-01-08 200951 Screenshot 2026-01-08 200959

… Conditions pages.

I have Improved layout consistency between Privacy Policy and Terms & Conditions pages.
@vercel
Copy link

vercel bot commented Jan 8, 2026

@Sumit-programmer-787 is attempting to deploy a commit to the Vivek Prajapati's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 8, 2026

📝 Walkthrough

Walkthrough

Introduces a new static HTML privacy policy page (vigybag.html) with header navigation, structured legal content sections (Introduction, Collection of Information, Cookies & Tracking, Security & Rights), contact information, responsive CSS styling, and basic JavaScript for footer year updates, active navigation highlighting, and smooth scrolling functionality.

Changes

Cohort / File(s) Summary
Privacy Policy Page
vigybag.html
New static HTML page with embedded CSS and JavaScript. Includes responsive layout with header navigation, multi-section legal content with icons, "Last Updated" badge, Grievance Officer contact block, footer, and client-side logic for dynamic year display and smooth anchor navigation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

Possibly related PRs

  • pages linked #2002: Converts static "Privacy Policy" text into a clickable link redirecting to the new vigybag.html page introduced in this PR.
  • Enhanced Privacy Page in new VigyBag #1491: Updates privacy policy implementation across React components and footer links, complementing this standalone HTML privacy policy page addition.

Suggested labels

good first issue, FrontEnd, OSCI, 2⭐⭐

Suggested reviewers

  • codervivek5

Poem

🐰 A policy page hops into view,
With sections so clear, a legal debut,
Smooth scrolling delights through privacy's maze,
Responsive and bright in all its displays! 📜✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title refers to improving layout consistency between Privacy Policy and Terms & Conditions pages, which aligns with the vigybag.html Privacy Policy addition, though it's incomplete and cuts off mid-sentence.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The pull request description is comprehensive and well-structured, including issue reference, detailed changes, screenshots, and clear categorization.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Fix all issues with AI agents
In @vigybag.html:
- Line 7: The external Font Awesome stylesheet link element (the <link
rel="stylesheet" href="https://cdnjs.cloudflare.com/.../all.min.css">) lacks
Subresource Integrity; generate the SRI hash for that exact file (e.g., via
https://www.srihash.org/), then update the same <link> tag to include
integrity="shaXXX-..." and crossorigin="anonymous" attributes so the browser
verifies the CDN asset before loading.
- Around line 330-341: The nav has a hardcoded active class on the anchor with
class "nav-link active" pointing to "/privacy-policy", which mismatches the
actual page filename and breaks the JS pathname matching; fix by either renaming
the page to match the nav href (make the file name match "/privacy-policy"), or
update the anchor href to the current filename/path, or remove the hardcoded
"active" class from the element and let the existing JS that queries ".nav-link"
apply the active class dynamically (ensure the hrefs and
window.location.pathname are consistent).
- Around line 1-476: The navigation href in vigybag.html (anchor with class
"nav-link" currently pointing to "/terms") does not match the actual React route
"/terms-and-condition" (TermsAndCondition.jsx) and there is an architectural
mismatch between a static Privacy Policy HTML page and a React-based Terms page;
update the link target in the navigation (the <a> element with class "nav-link"
that currently reads "/terms") to the correct route "/terms-and-condition" and
then decide on a consistent architecture: either convert TermsAndCondition.jsx
into a static HTML page matching vigybag.html's structure or port vigybag.html
into a React component that reuses the same layout (header/footer classes like
"legal-header", "legal-container", "page-title" etc.) so both pages live in the
same framework and share styling and routing.
🧹 Nitpick comments (3)
vigybag.html (3)

434-436: Consider using the current year in the static HTML to avoid initial flicker.

The copyright currently shows "2025" in the static HTML, but JavaScript updates it to the current year on page load (line 444). This may cause a brief flicker showing the wrong year before JavaScript executes.

♻️ Proposed fix
-                &copy; 2025 VigyBag Pvt. Ltd. All rights reserved.
+                &copy; <span id="copyright-year">2026</span> VigyBag Pvt. Ltd. All rights reserved.

Then update the JavaScript to target the span:

-            document.querySelector('.copyright').innerHTML = `&copy; ${new Date().getFullYear()} VigyBag Pvt. Ltd. All rights reserved.`;
+            const yearElement = document.getElementById('copyright-year');
+            if (yearElement) yearElement.textContent = new Date().getFullYear();

457-472: Minor: Optimize smooth scroll anchor link logic.

The check for targetId === '#' happens after preventDefault(), meaning that clicking a bare # link will prevent the default behavior but perform no action. Consider checking the target before preventing default.

♻️ Proposed fix
             document.querySelectorAll('a[href^="#"]').forEach(anchor => {
                 anchor.addEventListener('click', function(e) {
-                    e.preventDefault();
                     const targetId = this.getAttribute('href');
                     if(targetId === '#') return;
+                    e.preventDefault();
                     
                     const targetElement = document.querySelector(targetId);
                     if(targetElement) {
                         window.scrollTo({
                             top: targetElement.offsetTop - 100,
                             behavior: 'smooth'
                         });
                     }
                 });
             });

328-342: Consider adding accessibility improvements for keyboard navigation.

The page lacks a skip-to-content link, which helps keyboard users bypass the header and navigate directly to the main content. This is especially useful with a sticky header.

♿ Proposed accessibility enhancements

Add a skip link at the very beginning of the body:

 <body>
+    <!-- Skip to main content link for accessibility -->
+    <a href="#main-content" class="skip-link">Skip to main content</a>
+    
     <!-- Consistent Header Navigation -->
     <header class="legal-header">

Add an ID to the main element:

-    <main class="legal-container">
+    <main class="legal-container" id="main-content">

Add CSS for the skip link (add to the style section):

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-green);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 2000;
}

.skip-link:focus {
    top: 0;
}
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 796c229 and b92733f.

📒 Files selected for processing (1)
  • vigybag.html
🔇 Additional comments (3)
vigybag.html (3)

8-326: Well-structured CSS with responsive design and print styles.

The CSS implementation follows good practices with CSS custom properties, responsive breakpoints, and dedicated print styles. The naming conventions are semantic and maintainable.


349-352: Verify the "Last Updated" date is accurate.

The privacy policy shows "Last Updated: September 5, 2025", which is approximately 4 months ago. Please confirm this date is accurate and not a placeholder that needs updating.


355-427: Privacy policy content is well-structured and compliant.

The privacy policy sections are clearly organized with appropriate headings, icons, and contact information. The inclusion of grievance officer details is appropriate for regulatory compliance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant