Skip to content

feat(property-list): improve empty state for property list - #1294

Merged
nanaf6203-bit merged 1 commit into
MettaChain:mainfrom
1Judah:feat/issue-1180-improve-empty-state
Oct 15, 2026
Merged

nanaf6203-bit merged 1 commit into
MettaChain:mainfrom
1Judah:feat/issue-1180-improve-empty-state

Conversation

@1Judah

@1Judah 1Judah commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Improves the empty state for the PropertyList component. When a listing search returns no results, the virtualized grid now renders a proper empty state with a heading, explanatory copy and a "Browse Properties" action instead of an empty scroll container.

This branch has been rebased onto the current main, and while doing so it also repairs a broken reference in the same file: the virtualizer options were still reading the rowCount binding that the memoization refactor removed, leaving the grid referencing an undeclared variable. The row count now derives from the length of the chunked rows array.

Problem

VirtualizedPropertyGrid always rendered its scrollable container and ul list, so a result set with zero properties produced a large blank region with an aria-label announcing "0 items" and nothing else. Users could not tell whether the search had failed, was still loading, or had genuinely returned nothing, and were given no route back to a full listing.

Changes Made

  • Imported the existing PropertyEmptyState helper from src/components/ui/EmptyState.tsx in src/components/VirtualizedPropertyGrid.tsx.
  • Added an early return in the grid that renders PropertyEmptyState when properties.length === 0, passing the component's className through so surrounding layout spacing is preserved.
  • Corrected the virtualizer count and its memo dependency from the removed rowCount to rows.length.

Implementation Details

The early return is placed after the existing useRef, useState, useEffect, useMemo and useVirtualizer calls, so the rules of hooks are respected and the hook sequence is identical whether the grid is empty or not. rows.length is numerically equivalent to the previous Math.ceil(properties.length / columns) calculation and is already computed immediately above, so no extra work is introduced. PropertyEmptyState is the shared empty-state component already used elsewhere in the app, which keeps the heading, description and call-to-action consistent with the rest of the search experience.

Closes #1182

Closes #1181

Closes #1180

Closes #1179

@drips-wave

drips-wave Bot commented Oct 15, 2026

Copy link
Copy Markdown

@1Judah Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Also repairs the virtualizer row count, which after the memoization
refactor was left referencing the removed rowCount binding, to use the
length of the chunked rows array.
@1Judah
1Judah force-pushed the feat/issue-1180-improve-empty-state branch from 3f8342a to 80e732e Compare October 15, 2026 16:57

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

LGTM

@nanaf6203-bit
nanaf6203-bit merged commit b4fbc67 into MettaChain:main Oct 15, 2026
2 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants