Skip to content

Add Privacy Policy and Terms of Service pages with routing#29

Open
Mr-Technician wants to merge 1 commit into
devfrom
feat/privacy-tos
Open

Add Privacy Policy and Terms of Service pages with routing#29
Mr-Technician wants to merge 1 commit into
devfrom
feat/privacy-tos

Conversation

@Mr-Technician
Copy link
Copy Markdown
Member

@Mr-Technician Mr-Technician commented Apr 24, 2026

This pull request introduces a new legal section to the app, adding dedicated Privacy Policy and Terms of Service pages, updating the footer to link to these new pages, and refactoring related navigation and styling. The changes improve the app’s legal compliance and user transparency, while also simplifying the footer’s design and code.

Legal and Compliance Enhancements:

  • Added new Privacy.js and Terms.js components, providing comprehensive Privacy Policy and Terms of Service pages, and included corresponding styles in Legal.css. [1] [2] [3]
  • Updated the footer to remove the modal-based Non-Affiliation Disclaimer and instead provide persistent links to the new Terms and Privacy pages. [1] [2] [3]

Navigation and Routing Updates:

  • Registered new routes for /privacy and /terms (as well as /subscribed and /unsubscribed) in AppRouter.js, and moved the Footer component to be rendered within the router for consistent footer display across all pages. [1] [2] [3]
  • Removed import and rendering of Footer from App.js, as it is now handled by AppRouter.js. [1] [2]

Styling Improvements:

  • Added new styles in Legal.css for the legal pages, and made minor adjustments to Footer.css for improved layout and mobile responsiveness. [1] [2]

Summary by CodeRabbit

  • New Features

    • Added Privacy Policy page with detailed privacy information
    • Added Terms of Service page
    • Added subscription management pages
    • Redesigned footer with direct navigation links to legal pages
  • Style

    • Updated footer styling and layout

@Mr-Technician
Copy link
Copy Markdown
Member Author

oops wrong branch

@Mr-Technician Mr-Technician reopened this Apr 24, 2026
@Mr-Technician Mr-Technician changed the base branch from main to dev April 24, 2026 03:48
Copy link
Copy Markdown

@Mootbing Mootbing left a comment

Choose a reason for hiding this comment

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

lgtm

@Mr-Technician
Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 3, 2026

✅ Action performed

Full review finished.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 3, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

This PR restructures the footer layout and introduces legal policy pages. Footer rendering moves from App.js to AppRouter.js, new Privacy and Terms pages are added with full legal content, and the Footer component is updated to link to these pages instead of displaying an inline disclaimer dialog.

Changes

Legal Pages and Footer Restructuring

Layer / File(s) Summary
Footer relocation and routing setup
src/App.js, src/AppRouter.js
Footer import and rendering are removed from App.js, then the Footer component is imported into AppRouter.js and rendered after <Routes>. New routes are registered for /alerts, /privacy, /subscribed, /terms, and /unsubscribed, mapping to their corresponding page components.
Privacy and Terms pages with shared legal styling
src/Privacy.js, src/Terms.js, src/Legal.css
Privacy.js and Terms.js are added as complete legal document pages covering information collection, usage, sharing, retention, security, children's privacy, and contact information. Legal.css provides unified layout and typography rules for the legal container and section layouts.
Footer navigation links and styling
src/Footer.js, src/Footer.css
Footer.js removes the Material UI dialog disclaimer and replaces it with react-router-dom Link components navigating to /terms and /privacy. Footer.css updates mobile height from 10.5rem to 12rem and explicitly defines .vertical-bar styling for link separators.

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly Related PRs

  • RailForLess/railforless#28: Both PRs modify src/AppRouter.js to add and route the price-alert-related paths (/alerts, /subscribed, /unsubscribed).

Suggested Reviewers

  • tikkisean

🐰 Legal pages unfold, with routes aligned,
Footer now links what users need to find—
Privacy, Terms, all neatly in place,
A cleaner design with more breathing space!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add Privacy Policy and Terms of Service pages with routing' directly and accurately summarizes the main changes: two new legal pages (Privacy and Terms) and their integration into the routing system.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/privacy-tos
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch feat/privacy-tos

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
Copy Markdown
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: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/AppRouter.js (1)

29-31: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Reset scroll position when navigating to legal routes (/privacy, /terms).

src/AppRouter.js wraps <Navbar />, <Routes />, and <Footer /> inside <BrowserRouter>, and there’s no scroll restoration/scroll-to-top logic anywhere under src/ (no ScrollRestoration, window.scrollTo, or location-change scroll reset). Clicking footer links to /privacy or /terms can therefore land users partway down the page—add a small route-change scroll reset component next to <Routes />.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/AppRouter.js` around lines 29 - 31, Add a small route-change scroll reset
component and mount it inside the existing BrowserRouter alongside <Routes /> so
legal links always start at top: implement a ScrollToTop React component that
uses useLocation() and useEffect() to call window.scrollTo(0, 0) whenever
location.pathname changes, export it (e.g., ScrollToTop) and import it into
src/AppRouter.js, then render <ScrollToTop /> directly under <BrowserRouter> and
before or next to <Routes /> (keeping existing <Navbar /> and <Footer />
unchanged).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/AppRouter.js`:
- Line 48: AppRouter renders <Alerts /> but never imports it; add an import for
the Alerts component at the top of the file (or use React.lazy if you prefer
code-splitting) so the Route path="/alerts" can resolve. Locate AppRouter (where
Route is defined) and add a correct import statement referencing the Alerts
component name (matching the exported symbol from the Alerts module) and update
any relative path to the Alerts file accordingly.

---

Outside diff comments:
In `@src/AppRouter.js`:
- Around line 29-31: Add a small route-change scroll reset component and mount
it inside the existing BrowserRouter alongside <Routes /> so legal links always
start at top: implement a ScrollToTop React component that uses useLocation()
and useEffect() to call window.scrollTo(0, 0) whenever location.pathname
changes, export it (e.g., ScrollToTop) and import it into src/AppRouter.js, then
render <ScrollToTop /> directly under <BrowserRouter> and before or next to
<Routes /> (keeping existing <Navbar /> and <Footer /> unchanged).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b7a64974-784a-40ac-a101-df659300575f

📥 Commits

Reviewing files that changed from the base of the PR and between 6599289 and 4ee24c5.

📒 Files selected for processing (7)
  • src/App.js
  • src/AppRouter.js
  • src/Footer.css
  • src/Footer.js
  • src/Legal.css
  • src/Privacy.js
  • src/Terms.js
💤 Files with no reviewable changes (1)
  • src/App.js

Comment thread src/AppRouter.js
}
/>
<Route path="/about" element={<About />} />
<Route path="/alerts" element={<Alerts />} />
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Import Alerts before routing to it.

Line 48 renders <Alerts />, but this file never imports Alerts, so AppRouter.js will fail to compile and the new /alerts flow referenced from the legal copy cannot work.

Suggested fix
 import About from "./About";
+import Alerts from "./Alerts";
 import Footer from "./Footer";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<Route path="/alerts" element={<Alerts />} />
import About from "./About";
import Alerts from "./Alerts";
import Footer from "./Footer";
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/AppRouter.js` at line 48, AppRouter renders <Alerts /> but never imports
it; add an import for the Alerts component at the top of the file (or use
React.lazy if you prefer code-splitting) so the Route path="/alerts" can
resolve. Locate AppRouter (where Route is defined) and add a correct import
statement referencing the Alerts component name (matching the exported symbol
from the Alerts module) and update any relative path to the Alerts file
accordingly.

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.

2 participants