WordPress-iOS
WordPress-iOS copied to clipboard
Extract DataViewPaginatedResponse
This PR is a prerequisite for reimplementing "Jetpack Activity Logs" using "DataViews".
Summary
- Extracted
DataViewPaginatedResponsefor managing paginated data loading - Implemented
DataViewPaginatedForEachSwiftUI component for displaying paginated lists - Refactored subscribers feature to use the new types
- Added test coverage for the pagination functionality
- Fix an issue with deleteItem not updating
count(should decrement by one) - Rename
LoadMoreFooterViewto make it clear it's part of the "DataView" infrastructure
Test Plan
- Verify subscribers list loads and paginates correctly
- Test error states and retry functionality in subscribers
- Confirm footer loading/error states display properly
- Run existing subscribers tests to ensure no regressions
https://github.com/user-attachments/assets/5af21bdb-893c-4790-a93d-26f1baece6c1
Note: nearly all code was generated with Claude Code (after many-many prompts)
| 2 Warnings | |
|---|---|
| :warning: | This PR is larger than 500 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews. |
| :warning: | This PR is assigned to the milestone 26.0. The due date for this milestone has already passed. Please assign it to a milestone with a later deadline or check whether the release for this milestone has already been finished. |
Generated by :no_entry_sign: Danger
📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
| App Name | Jetpack | |
| Configuration | Release-Alpha | |
| Build Number | 27883 | |
| Version | PR #24592 | |
| Bundle ID | com.jetpack.alpha | |
| Commit | f99f95c9151e7d5dd16b59bab48858cab4a8a6f6 | |
| Installation URL | 35vrmjvi9m3ng |
📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
| App Name | WordPress | |
| Configuration | Release-Alpha | |
| Build Number | 27883 | |
| Version | PR #24592 | |
| Bundle ID | org.wordpress.alpha | |
| Commit | f99f95c9151e7d5dd16b59bab48858cab4a8a6f6 | |
| Installation URL | 7frij6e7ks93g |
Something is wrong with this PR. It keeps marking my replies as "Pending".
I addressed the feedback, and here was the reply about the filters UI/UX:
It might be the only reasonable option, and it matches the behavior on the web.
The primary use-case would be the following:
- You open "Subscribers"
- You want to see only your paid subscribers, so you select the filter
- We re-fetch the data
- It's less likely that you would scroll first and only then start filtering.
I'm open to suggestions how to improve this. I initially considered creating an in-memory store similar to the one for plugins, but I decided it wasn't needed as the current UI/UX with just an in-memory cache of the current request with a combination of fast response work really well. We should be able to use it for the majority of features.
Quality Gate passed
Issues
3 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code