Skip to content

Zero Results Display for Search - #3500

Open
saengel wants to merge 9 commits into
search-sk-sddfrom
feature/sc-45481/frontend-null-states
Open

Zero Results Display for Search#3500
saengel wants to merge 9 commits into
search-sk-sddfrom
feature/sc-45481/frontend-null-states

Conversation

@saengel

@saengel saengel commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Description

Null state rendering on a per-tab basis when searches return 0 results.

Code Changes

A new static/js/NoSearchResults.jsx component with associated CSS, and rendering on a per-tab basis in static/js/SearchPage.jsx. Once the backend has been wired up to populate the tabs, we will need to add a conditional for rendering the null state component only in cases of 0 results.

Notes

  1. Still waiting on author copy, tracking in a separate card to not hold this back (lorem ipsum for now)
  2. Instead of hardcoded copy, do we need to integrate with Weblate?
  3. Hebrew was not yet addressed, waiting for a decision.

@saengel saengel changed the title Feature/sc 45481/frontend null states Zero Results Display for Search Jul 9, 2026
@saengel
saengel marked this pull request as ready for review July 29, 2026 15:31

Copilot AI 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.

Pull request overview

This PR adds a dedicated “zero results” (null state) UI for search, rendering a tab-specific empty state when a search returns no hits, and disables sort/filter controls where they don’t apply.

Changes:

  • Introduces a new NoSearchResults React component for tab-specific zero-results rendering.
  • Updates SearchPage (and related sort/filter controls) to render the null state per tab and disable controls when there are no results.
  • Adds English i18n strings and CSS styling for the new null state and disabled controls.

Reviewed changes

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

Show a summary per file
File Description
static/js/sheets/SheetsWithRefPage.jsx Switches the “Sheets With Ref” page layout to reuse SearchPage (but currently breaks sheet rendering due to missing required props).
static/js/sefaria/i18n/interface/en.json Adds English copy for the per-tab null state.
static/js/SearchSortDropdown.jsx Adds a disabled rendering path for entity sort dropdowns.
static/js/SearchResultList.jsx Adds disabled states for sort/filter UI elements.
static/js/SearchPage.jsx Renders NoSearchResults on 0 hits (sources + entities) and disables sort/filter controls when empty.
static/js/NoSearchResults.jsx New component implementing the per-tab null state UI and CTA/caption rendering.
static/css/s2.css Styles for the null state component and disabled sort/filter controls.
Comments suppressed due to low confidence (3)

static/js/sefaria/i18n/interface/en.json:376

  • Grammar: "Something seem wrong?" should be "Something seems wrong?".
  "search.null.books.caption": "Something seem wrong? Report a bug or contact us.",

static/js/sefaria/i18n/interface/en.json:380

  • Grammar: "Something seem wrong?" should be "Something seems wrong?".
  "search.null.sources.caption": "Something seem wrong? Report a bug or contact us.",

static/js/sefaria/i18n/interface/en.json:384

  • Grammar: "Something seem wrong?" should be "Something seems wrong?".
  "search.null.topics.caption": "Something seem wrong? Report a bug or contact us.",

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

Comment thread static/js/sheets/SheetsWithRefPage.jsx Outdated
Comment thread static/js/NoSearchResults.jsx Outdated
Comment thread static/js/sefaria/i18n/interface/en.json Outdated
Comment thread static/js/NoSearchResults.jsx Outdated
Comment on lines +37 to +41
// The caption key value is "Something seem wrong? Report a bug or contact us."
// We split around the two link phrases to keep them clickable.
const CAPTION_LINK_PATTERN = /(Report a bug|contact us)/;

function renderCaption(captionKey) {
Comment thread static/js/NoSearchResults.jsx
Comment thread static/js/SearchPage.jsx Outdated
@Sefaria Sefaria deleted a comment from gitvelocity-reviewer Bot Jul 30, 2026
@saengel
saengel requested a review from stevekaplan123 July 30, 2026 13:06
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.

3 participants