feat: searchable Item Name field (+ React 18 / Router 7 / Redux 5 upgrade)#51
Merged
Conversation
The React/router/redux modernization (4b), targeting React 18 (see note below). - react/react-dom 16 -> 18 (ReactDOM.render -> createRoot) - react-router-dom 5 -> 7: Switch->Routes, component/render->element; refactor withRouter / props.history / props.match to useNavigate / useParams / Navigate (Login, CustomNavbar, Create, Edit, Profile, CreateList, ListPage) - redux 4 -> 5, react-redux 7 -> 9 - react-toast-notifications (unmaintained, breaks on React 18+) -> react-hot-toast (ToastProvider -> <Toaster>, useToasts/addToast -> toast.success/.error) - react-helmet -> react-helmet-async (+ HelmetProvider) React 19 deferred: it removed ReactDOM.findDOMNode, which reactstrap 8 relies on; reaching 19 needs replacing reactstrap + the Argon Bootstrap-4 theme (a UI rebuild). React 18 keeps reactstrap/Argon working. Verified: vite build green; production image runs; app mounts, images render, client-side routing works, Toaster + Google button render. Login/create/fav flows pending manual verification (need live Google auth). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Turn the "Item name" input on a list into a search-as-you-type box that queries books / movies & TV / music catalogs at once. Selecting a result autofills the item name, URL and picture (skipping the og:image scrape). - _itemSearchField.js: debounced typeahead with a grouped suggestions dropdown (Books / Movies & TV / Music), thumbnails, click-outside close, and on-select autofill of name/url/pic_url via Formik setFieldValue. - list.service.js: searchExternal(idToken, query) -> GET /search/?q= - ListPage.js: add pic_url to Formik initialValues and swap the name Field for ItemSearchField. Free typing still works (og:image fallback). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two commits land together here, since the search feature is built on the dependency upgrade:
b8183a5)8b0bbfa) — turns the add-item name input into a search-as-you-type box backed by external catalogs.Search feature
Typing in the Item Name field queries the backend
GET /search/?q=endpoint (see backend PR #6) and shows grouped suggestions; selecting one autofills the name, URL and picture._itemSearchField.js— new debounced (300ms, ≥2 chars) typeahead with a grouped dropdown (Books / Movies & TV / Music), thumbnails, click-outside-to-close, and on-select autofill ofname/url/pic_urlvia FormiksetFieldValue.list.service.js—searchExternal(idToken, query)→GET /search/?q=with Bearer auth.ListPage.js— addspic_urlto FormikinitialValuesand swaps the nameFieldforItemSearchField. Free typing still works (backend falls back to og:image scraping when no picture is supplied).Verified
npm run build(Vite) passes.Depends on
Backend PR curatedlist/backend#6 (the
/search/endpoint) and aTMDB_API_KEYset on thebackCloud Run service (already configured).🤖 Generated with Claude Code