Skip to content

Integrate Price Alerts feature into top banner#31

Open
Mr-Technician wants to merge 1 commit into
devfrom
price-alerts-banner
Open

Integrate Price Alerts feature into top banner#31
Mr-Technician wants to merge 1 commit into
devfrom
price-alerts-banner

Conversation

@Mr-Technician
Copy link
Copy Markdown
Member

@Mr-Technician Mr-Technician commented Jun 3, 2026

This pull request makes several improvements to routing and updates the user interface to better promote the new Price Alerts feature. The routing logic is now centralized in App.js for better organization, and the UpdateBar and Navbar have been updated to highlight Price Alerts and provide more relevant information to users.

Routing improvements:

  • Moved the BrowserRouter component from AppRouter.js to wrap the app in App.js, ensuring routing context is available throughout the app and removing redundant router nesting. [1] [2] [3] [4] [5]

User interface updates for Price Alerts:

  • Updated the Navbar button label from "Fare Alerts" to "Price Alerts" for consistency and clarity.
  • Modified the UpdateBar announcement to highlight the new Price Alerts feature, including a detailed description and links to the Alerts page. [1] [2]
  • Updated the Mardi Gras Service link in UpdateBar to the correct Amtrak URL.
  • Added react-router-dom's Link import in UpdateBar.js to enable internal navigation.

Summary by CodeRabbit

  • Updates
    • Updated Alerts navigation label for consistency
    • Refreshed promotional messaging in the update bar to highlight Price Alerts functionality
    • Enhanced modal dialog content with new information about available services and pricing notifications

@Mr-Technician Mr-Technician requested a review from tikkisean June 3, 2026 04:32
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 3, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

The PR restructures the React Router setup by moving BrowserRouter from AppRouter to the top-level App component, and introduces Price Alerts messaging throughout the UI by updating navigation labels and modal content.

Changes

Router Architecture and Price Alerts Updates

Layer / File(s) Summary
Move BrowserRouter context to App level
src/App.js, src/AppRouter.js
BrowserRouter import and wrapper move from AppRouter to App, making it the top-level context provider. AppRouter now imports only Route and Routes, removes its own router wrapping, and renders Navbar and Routes directly within the component's main element.
Price Alerts messaging and navigation
src/Navbar.js, src/UpdateBar.js
Navbar link label for Alerts changes from "Fare" to "Price" prefix. UpdateBar imports Link for internal navigation, updates the teaser text to "Price Alerts," and replaces modal content with a "Never Miss a Price Drop" section linking to /alerts alongside a new Mardi Gras service announcement.

Sequence Diagram(s)

(Skipped: Changes do not meet criteria for diagram generation; primarily architectural refactoring and content updates without new multi-component interaction flows.)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • tikkisean

Poem

🐰 A router ascends to its rightful height,
From AppRouter to App—what a sight!
With "Price" now proclaimed across every view,
And alerts that link straight to what's new,
The browser's now wisely aware of its place! 🚂

🚥 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 'Integrate Price Alerts feature into top banner' directly reflects the main change: promoting the Price Alerts feature in the UpdateBar component with new UI text and links.
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 price-alerts-banner

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.

@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.

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

🤖 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/UpdateBar.js`:
- Around line 38-60: The modal content currently renders semantic elements like
<h2> and <hr> inside DialogContentText (in UpdateBar.js), which is
paragraph-typed and invalid; update the DialogContentText wrapper used for this
block to use component="div" (or replace with a Box/div) so headings and
separators are valid, keeping the existing Link and onClick={() =>
setDialog(false)} behavior 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: 0b047b6e-af68-46fe-b6d3-07f733eed48b

📥 Commits

Reviewing files that changed from the base of the PR and between 02f7760 and 6841c63.

📒 Files selected for processing (4)
  • src/App.js
  • src/AppRouter.js
  • src/Navbar.js
  • src/UpdateBar.js

Comment thread src/UpdateBar.js
Comment on lines +38 to +60
<h2>Never Miss a Price Drop</h2>
Tired of refreshing fares hoping for a better deal? Now you don't
have to. Introducing{" "}
<Link to="/alerts" onClick={() => setDialog(false)}>
Price Alerts
</Link>
—tell us your route, travel dates, and the price you're after, and
we'll email you when a matching fare drops.
<br></br>
<br></br>
Set up an alert in seconds: pick your origin and destination, choose
an accommodation, and optionally set a target price. We'll keep an eye
on fares for you and check back regularly, so the next time prices
fall, you'll hear about it. Unsubscribe anytime with a single click.
Head to the{" "}
<Link to="/alerts" onClick={() => setDialog(false)}>
Alerts
</Link>{" "}
page to create yours today.
<br></br>
<br></br>
<hr></hr>
<br></br>
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 | 🟡 Minor | ⚡ Quick win

Use a non-paragraph container for the rich modal content.

This block adds heading/separator markup inside DialogContentText, which is paragraph-typed and not semantically valid for <h2>/<hr>. Switch DialogContentText to component="div" (or use Box) for this section.

Proposed fix
-				<DialogContentText>
+				<DialogContentText component="div">
 						<h2>Never Miss a Price Drop</h2>
 						...
 					</DialogContentText>
📝 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
<h2>Never Miss a Price Drop</h2>
Tired of refreshing fares hoping for a better deal? Now you don't
have to. Introducing{" "}
<Link to="/alerts" onClick={() => setDialog(false)}>
Price Alerts
</Link>
—tell us your route, travel dates, and the price you're after, and
we'll email you when a matching fare drops.
<br></br>
<br></br>
Set up an alert in seconds: pick your origin and destination, choose
an accommodation, and optionally set a target price. We'll keep an eye
on fares for you and check back regularly, so the next time prices
fall, you'll hear about it. Unsubscribe anytime with a single click.
Head to the{" "}
<Link to="/alerts" onClick={() => setDialog(false)}>
Alerts
</Link>{" "}
page to create yours today.
<br></br>
<br></br>
<hr></hr>
<br></br>
<DialogContentText component="div">
<h2>Never Miss a Price Drop</h2>
Tired of refreshing fares hoping for a better deal? Now you don't
have to. Introducing{" "}
<Link to="/alerts" onClick={() => setDialog(false)}>
Price Alerts
</Link>
—tell us your route, travel dates, and the price you're after, and
we'll email you when a matching fare drops.
<br></br>
<br></br>
Set up an alert in seconds: pick your origin and destination, choose
an accommodation, and optionally set a target price. We'll keep an eye
on fares for you and check back regularly, so the next time prices
fall, you'll hear about it. Unsubscribe anytime with a single click.
Head to the{" "}
<Link to="/alerts" onClick={() => setDialog(false)}>
Alerts
</Link>{" "}
page to create yours today.
<br></br>
<br></br>
<hr></hr>
<br></br>
</DialogContentText>
🤖 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/UpdateBar.js` around lines 38 - 60, The modal content currently renders
semantic elements like <h2> and <hr> inside DialogContentText (in UpdateBar.js),
which is paragraph-typed and invalid; update the DialogContentText wrapper used
for this block to use component="div" (or replace with a Box/div) so headings
and separators are valid, keeping the existing Link and onClick={() =>
setDialog(false)} behavior unchanged.

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