Skip to content

fix: filter and search all shares before paginating the share views - #3875

Merged
AlexAndBear merged 2 commits into
mainfrom
fix/share-views-pagination
Oct 21, 2026
Merged

AlexAndBear merged 2 commits into
mainfrom
fix/share-views-pagination

Conversation

@AlexAndBear

Copy link
Copy Markdown
Member

Description

  • Filter before paginating: the share views filtered and searched paginatedResources, i.e. only the current page. useResourcesViewDefaults gets an optional filterResources callback that runs before sort and pagination, so the order is now full list -> filters/search -> sort -> paginate. Views that don't pass it behave as before.
  • Shared with me: gets a pager and list info like the other views. The visible/hidden toggle, share type, shared by and search run before pagination, and the filter options come from all shares, not just the first page. Its own second useSort is gone; it uses the composable's sorting.
  • Shared with others and Shared via link: search and the share type filter cover all shares, and the pager reflects the filtered result. Changing the search resets to page 1, like the Spaces overview.
  • Deep links: useResourcesViewDefaults also returns sortedResources (filtered and sorted, not paginated), which the three views pass to scrollToResourceFromRoute, so a notification link to a share on a later page jumps to that page.
  • ItemFilterInline: drops the page query when an option is picked, like the other filters, so switching to hidden shares starts on page 1.

Related Issue

How Has This Been Tested?

  • test environment: unit tests (Vitest), browser tests (Playwright) against a local OpenCloud
  • test case 1: unit: filtering before pagination in the composable; search finds shares beyond the current page, filter options come from all shares, hidden shares beyond the first page, page reset and the pager in Shared with me; scrollTo finds a share beyond the current page (all fail without the fix)
  • test case 2: browser (53 shares, 20 per page): Shared with me showed 20 shares without a pager on main; with the fix it has 3 pages, and search, Shared by filter and hidden shares cover all shares
  • test case 3: browser: search and share type filter in Shared with others and Shared via link find items on later pages; a deep link with scrollTo jumps to page 3 and selects the share in all three views
  • test case 4: browser: sorting, select-all and batch hide on the current page, keyboard navigation, back/forward between pages, items per page; folder view and search result pagination unchanged

Types of changes

  • Bugfix
  • Enhancement (a change that doesn't break existing code or deployments)
  • Breaking change (a modification that affects current functionality)
  • Technical debt (addressing code that needs refactoring or improvements)
  • Tests (adding or improving tests)
  • Documentation (updates or additions to documentation)
  • Maintenance (like dependency updates or tooling adjustments)

@AlexAndBear
AlexAndBear force-pushed the fix/share-views-pagination branch from 7058c15 to 4c209b6 Compare October 20, 2026 20:55
@AlexAndBear
AlexAndBear merged commit c243bc3 into main Oct 21, 2026
27 checks passed
@AlexAndBear
AlexAndBear deleted the fix/share-views-pagination branch October 21, 2026 08:31
@openclouders openclouders mentioned this pull request Oct 21, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shares beyond the page size can't be reached or found in the share views

2 participants