fix: remove all notes status pills

This commit is contained in:
lucaronin
2026-04-14 20:07:54 +02:00
parent 1388e7ddbe
commit 9ccd0a7221
2 changed files with 8 additions and 15 deletions

View File

@@ -191,24 +191,17 @@ describe('NoteList filter pills', () => {
expect(screen.getByTestId('filter-pill-archived')).toBeInTheDocument()
})
it('shows filter pills in all-notes view', () => {
it('does not show filter pills in all-notes view', () => {
renderNoteList({ entries: projectEntries })
expect(screen.getByTestId('filter-pills')).toBeInTheDocument()
expect(screen.getByTestId('filter-pill-open')).toBeInTheDocument()
expect(screen.getByTestId('filter-pill-archived')).toBeInTheDocument()
expect(screen.queryByTestId('filter-pills')).not.toBeInTheDocument()
})
it('shows the correct all-notes count badges', () => {
renderNoteList({ entries: projectEntries })
expect(screen.getByTestId('filter-pill-open')).toHaveTextContent('3')
expect(screen.getByTestId('filter-pill-archived')).toHaveTextContent('1')
})
it('shows archived notes in all-notes archived mode', () => {
it('ignores the archived sub-filter in all-notes view', () => {
renderNoteList({ entries: projectEntries, noteListFilter: 'archived' })
expect(screen.getByText('Archived Project')).toBeInTheDocument()
expect(screen.queryByText('Open Project 1')).not.toBeInTheDocument()
expect(screen.queryByText('Some Note')).not.toBeInTheDocument()
expect(screen.queryByTestId('filter-pills')).not.toBeInTheDocument()
expect(screen.getByText('Open Project 1')).toBeInTheDocument()
expect(screen.getByText('Some Note')).toBeInTheDocument()
expect(screen.queryByText('Archived Project')).not.toBeInTheDocument()
})
it('shows the correct counts for a type filter', () => {

View File

@@ -32,7 +32,7 @@ function useViewFlags(selection: SidebarSelection) {
const isInboxView = selection.kind === 'filter' && selection.filter === 'inbox'
const isAllNotesView = selection.kind === 'filter' && selection.filter === 'all'
const isChangesView = selection.kind === 'filter' && selection.filter === 'changes'
const showFilterPills = isSectionGroup || isFolderView || isAllNotesView
const showFilterPills = isSectionGroup || isFolderView
return { isSectionGroup, isFolderView, isInboxView, isAllNotesView, isChangesView, showFilterPills }
}