Skip to content

fix: add input search field on show pages list page#858

Open
tomrndom wants to merge 1 commit intomasterfrom
fix/show-pages-search
Open

fix: add input search field on show pages list page#858
tomrndom wants to merge 1 commit intomasterfrom
fix/show-pages-search

Conversation

@tomrndom
Copy link
Copy Markdown

@tomrndom tomrndom commented Apr 6, 2026

image

ref: https://app.clickup.com/t/86b96pbpc

Signed-off-by: Tomás Castillo tcastilloboireau@gmail.com

Summary by CodeRabbit

Release Notes

  • New Features
    • Added search functionality to the show pages list. Users can now enter search terms to filter results while preserving existing filters and sorting preferences.

Signed-off-by: Tomás Castillo <tcastilloboireau@gmail.com>
@tomrndom tomrndom requested a review from smarcet April 6, 2026 19:30
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 6, 2026

📝 Walkthrough

Walkthrough

A search input field has been added to the show pages list interface, enabling users to filter results by a search term while maintaining existing pagination and filter parameters.

Changes

Cohort / File(s) Summary
Search Functionality Addition
src/pages/sponsors/show-pages-list-page/index.js
Added SearchInput component to page header, implemented handleSearch handler that calls getShowPages() with search term while resetting pagination to DEFAULT_CURRENT_PAGE and preserving filter/sort parameters.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested reviewers

  • smarcet

Poem

🐰 A search box hops into view,
Through sponsor pages, hopping through,
With filters held and pagination new,
The search term leads us, crisp and true! 🔍

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: add input search field on show pages list page' directly and clearly describes the main change: adding a search input field to the show pages list page.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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 fix/show-pages-search

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

Copy link
Copy Markdown

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

🧹 Nitpick comments (1)
src/pages/sponsors/show-pages-list-page/index.js (1)

119-124: Consider preserving search context after save.

After a page is saved, getShowPages() is called without parameters, which resets the search term. If users search, edit a page, and save, they'll lose their search filter. Consider passing the current search state:

♻️ Suggested improvement
 const handleSaveShowPage = (entity) => {
   saveShowPage(entity).then(() => {
     setOpenPopup(null);
-    getShowPages();
+    getShowPages(term, currentPage, perPage, order, orderDir, hideArchived);
   });
 };
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/pages/sponsors/show-pages-list-page/index.js` around lines 119 - 124,
handleSaveShowPage currently calls saveShowPage(entity) and then getShowPages()
which clears the user's active search; preserve the current search/filter by
passing the existing search state into getShowPages after saving. Modify
handleSaveShowPage to read the current searchTerm (or filters/pagination state
used by getShowPages) and call getShowPages(searchTermOrFilters) instead of bare
getShowPages(), keeping the setOpenPopup(null) behavior and ensuring
getShowPages accepts and applies the passed search context (update getShowPages
signature if needed).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/pages/sponsors/show-pages-list-page/index.js`:
- Around line 119-124: handleSaveShowPage currently calls saveShowPage(entity)
and then getShowPages() which clears the user's active search; preserve the
current search/filter by passing the existing search state into getShowPages
after saving. Modify handleSaveShowPage to read the current searchTerm (or
filters/pagination state used by getShowPages) and call
getShowPages(searchTermOrFilters) instead of bare getShowPages(), keeping the
setOpenPopup(null) behavior and ensuring getShowPages accepts and applies the
passed search context (update getShowPages signature if needed).

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9d81b39e-b715-4abd-a697-5ee6e7bb0c18

📥 Commits

Reviewing files that changed from the base of the PR and between 2fa7555 and d68307f.

📒 Files selected for processing (1)
  • src/pages/sponsors/show-pages-list-page/index.js

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