Skip to content

Conversation

@veryayskiy
Copy link
Contributor

before

Screenshot 2025-05-23 at 17 47 08

after

Screenshot 2025-05-23 at 17 46 50 Screenshot 2025-05-23 at 17 46 07

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR adds search functionality to session recording saved filters and improves empty state handling. The changes include a new search input field and dedicated empty state component.

  • Added new SavedFiltersEmptyState component in frontend/src/scenes/session-recordings/filters/SavedFiltersEmptyState.tsx to handle error and no-filters states
  • Added search input field in frontend/src/scenes/session-recordings/filters/SavedFilters.tsx with real-time filtering
  • Modified savedSessionRecordingPlaylistsLogic to handle search state and filtering logic
  • Updated empty state to only show when there are no results AND no active search term
  • Improved UI by always showing 'Saved filters' tab regardless of filter count

4 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

import { savedSessionRecordingPlaylistsLogic } from '../saved-playlists/savedSessionRecordingPlaylistsLogic'

export function SavedFiltersEmptyState(): JSX.Element {
const playlistsLogic = savedSessionRecordingPlaylistsLogic({ tab: ReplayTabs.Playlists })
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Using ReplayTabs.Playlists here seems incorrect since this is a filters view, not a playlists view

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I know. The next step is separation of logics.

@github-actions
Copy link
Contributor

github-actions bot commented May 23, 2025

Size Change: +156 B (0%)

Total Size: 3.72 MB

ℹ️ View Unchanged
Filename Size Change
frontend/dist/toolbar.js 3.72 MB +156 B (0%)

compressed-size-action

@veryayskiy veryayskiy requested review from a team, pauldambra and sortafreel and removed request for a team May 23, 2025 16:35
value={savedFiltersSearch}
stopPropagation={true}
/>
<LemonTable
Copy link
Member

Choose a reason for hiding this comment

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

should we pass loading to lemon table still?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, as we have states above it that do it nicer:
f (savedFiltersLoading && !savedFiltersSearch) {
return
}

if (savedFilters.results?.length === 0 && !savedFiltersSearch) {
    return <SavedFiltersEmptyState />
}

limit: PLAYLISTS_PER_PAGE,
offset: Math.max(0, (filters.page - 1) * PLAYLISTS_PER_PAGE),
order: filters.order ?? '-last_modified_at', // Sync with `sorting` selector
order: '-last_modified_at',
Copy link
Member

Choose a reason for hiding this comment

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

i guess filters.order is a collections thing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes

Copy link
Member

@pauldambra pauldambra left a comment

Choose a reason for hiding this comment

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

couple of questions but otherwise :shipit:

@veryayskiy veryayskiy merged commit 79db241 into master May 26, 2025
95 of 96 checks passed
@veryayskiy veryayskiy deleted the feat/sr/search branch May 26, 2025 14:21
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