Skip to content

Add Search-by-Name Feature for RSS Feed Input#75

Open
raza-khan0108 wants to merge 1 commit intoamcquade:masterfrom
raza-khan0108:update-user-form
Open

Add Search-by-Name Feature for RSS Feed Input#75
raza-khan0108 wants to merge 1 commit intoamcquade:masterfrom
raza-khan0108:update-user-form

Conversation

@raza-khan0108
Copy link
Copy Markdown

@raza-khan0108 raza-khan0108 commented Mar 19, 2026

Summary

Enhanced the RSS feed input to support both direct URL entry and name-based podcast search, so users can discover feeds without knowing the exact RSS URL.

Changes

src/components/UserForm.jsx

  • Updated input placeholder and aria-label to "Enter an RSS Feed URL or search by Name..."
  • Added handleSearchChange handler to detect URL vs. name input
  • Added searchResults and searchDialogOpen state variables
  • Added renderSearchDialog() to display matching results in a MUI dialog

src/App.js

  • Imported additional MUI components (List, ListItem, etc.)
  • Added iTunes Search API call to fetch matching podcasts by name
  • On exact match → feed URL is set directly; on partial matches → selection dialog is shown

How It Works

  1. User types a URL → loads feed directly (existing behavior)
  2. User types a name → queries iTunes Search API → shows a dialog of matching podcasts to select from

Future Work

  • Autocomplete suggestions as the user types

Copilot AI review requested due to automatic review settings March 19, 2026 18:25
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a “search by podcast name” path to the RSS feed input flow by querying the iTunes Search API when the submitted input doesn’t look like a URL, and presenting selectable matches in a dialog.

Changes:

  • Updated the RSS input placeholder/ARIA label to indicate URL-or-name entry.
  • Refactored feed loading into a fetchRSS(url) helper and added iTunes Search API lookup for name-based input.
  • Added a MUI dialog listing matching podcasts (with artwork) so a user can select a feed to load.

Reviewed changes

Copilot reviewed 2 out of 4 changed files in this pull request and generated 5 comments.

File Description
src/components/UserForm.jsx Updates user-facing input text for URL-or-name entry; continues to submit via getFeed.
src/App.js Implements name search (iTunes API), refactors RSS fetching, and adds a selectable results dialog UI.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

setFetched({
episodes: feed.items,
program_title: feed.title,
program_image: feed.image.url,
const getFeed = async (event) => {
if (event && event.preventDefault != null) {
event.preventDefault();
}
if (data.results && data.results.length > 0) {
const exactMatch = data.results.find(p => p.collectionName.toLowerCase() === input_val.toLowerCase());
if (exactMatch && exactMatch.feedUrl) {
setFetching(false);
Comment on lines +90 to +91
setSearchResults(data.results.filter(p => p.feedUrl));
setSearchDialogOpen(true);
Comment on lines 22 to +27
<Input
placeholder="Enter your RSS Feed here..."
placeholder="Enter an RSS Feed URL or search by Name..."
type="text"
name="feed_url"
onChange={handleSearchChange}
aria-label="Enter your RSS Feed here..."
aria-label="Enter an RSS Feed URL or search by Name..."
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