Skip to content

Add new empty states for forms/entries searches#3191

Open
Crabcyborg wants to merge 1 commit into
masterfrom
add_new_empty_states_for_forms_entries_searches
Open

Add new empty states for forms/entries searches#3191
Crabcyborg wants to merge 1 commit into
masterfrom
add_new_empty_states_for_forms_entries_searches

Conversation

@Crabcyborg

@Crabcyborg Crabcyborg commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Razvan requested this.

Now, the empty states for forms/entries will show a special message when there is a search query, with a link to clear the search and reload the page.

Before
Screenshot 2026-07-16 at 11 48 38 AM

Screenshot 2026-07-16 at 11 48 24 AM

After
Screenshot 2026-07-16 at 11 46 54 AM

Screenshot 2026-07-16 at 11 47 09 AM

Summary by CodeRabbit

  • Bug Fixes
    • Improved empty search results messaging for entries and forms.
    • Added a “Clear search” link so users can quickly return to the full list.
    • Search-specific messages now display consistently instead of generic empty-state messages.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2b07d0ea-51a1-4ba6-b66a-e83d9569b4bd

📥 Commits

Reviewing files that changed from the base of the PR and between 0c69f73 and b0c447b.

📒 Files selected for processing (2)
  • classes/helpers/FrmEntriesListHelper.php
  • classes/helpers/FrmFormsListHelper.php
 _____________________________________________
< HD, 4K, 8K...I see bugs in all resolutions. >
 ---------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ 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 add_new_empty_states_for_forms_entries_searches

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.

@deepsource-io

deepsource-io Bot commented Jul 16, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in 0c69f73...b0c447b on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
PHP Jul 16, 2026 2:49p.m. Review ↗
JavaScript Jul 16, 2026 2:49p.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@coderabbitai coderabbitai Bot left a comment

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.

🧹 Nitpick comments (1)
classes/helpers/FrmEntriesListHelper.php (1)

212-215: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Simplify the generation of the "Clear search" URL.

WordPress's remove_query_arg() automatically defaults to using the current request URI if no URL is provided. Manually constructing the absolute URL using HTTP_HOST and REQUEST_URI is redundant and can occasionally cause issues in complex reverse-proxy environments. Additionally, FrmAppHelper::get_server_value() applies wp_strip_all_tags(), which could inadvertently alter valid URL parameters if they happen to contain tag-like characters.

You can safely simplify this to use WordPress's default behavior, as the output is correctly sanitized by esc_url() later:

  • classes/helpers/FrmEntriesListHelper.php#L212-L215: Replace these lines with $clear_url = remove_query_arg( 's' );
  • classes/helpers/FrmFormsListHelper.php#L145-L148: Replace these lines with $clear_url = remove_query_arg( 's' );
🤖 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 `@classes/helpers/FrmEntriesListHelper.php` around lines 212 - 215, In
classes/helpers/FrmEntriesListHelper.php lines 212-215 and
classes/helpers/FrmFormsListHelper.php lines 145-148, simplify the clear-search
URL generation by removing the manual HTTP_HOST/REQUEST_URI and set_url_scheme
logic, and call remove_query_arg('s') without an explicit URL in each helper’s
clear-URL flow.
🤖 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.

Nitpick comments:
In `@classes/helpers/FrmEntriesListHelper.php`:
- Around line 212-215: In classes/helpers/FrmEntriesListHelper.php lines 212-215
and classes/helpers/FrmFormsListHelper.php lines 145-148, simplify the
clear-search URL generation by removing the manual HTTP_HOST/REQUEST_URI and
set_url_scheme logic, and call remove_query_arg('s') without an explicit URL in
each helper’s clear-URL flow.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2b07d0ea-51a1-4ba6-b66a-e83d9569b4bd

📥 Commits

Reviewing files that changed from the base of the PR and between 0c69f73 and b0c447b.

📒 Files selected for processing (2)
  • classes/helpers/FrmEntriesListHelper.php
  • classes/helpers/FrmFormsListHelper.php

@garretlaxton garretlaxton left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants