Skip to content

Show a flat list of hierarchical list depending on pages count#25376

Merged
crazytonyli merged 1 commit intotrunkfrom
task/page-preload-fixed-amount
Mar 15, 2026
Merged

Show a flat list of hierarchical list depending on pages count#25376
crazytonyli merged 1 commit intotrunkfrom
task/page-preload-fixed-amount

Conversation

@crazytonyli
Copy link
Copy Markdown
Contributor

Description

Previously, the app always fetches all the pages (or post supports hierarchy). This PR adds a threshold (200). The app now fetches all posts and displays a hierarchical list, if the total post count is less than the threshold. Otherwise, it displays a flat list as if the post does not support hierarchy.

@crazytonyli crazytonyli added this to the 26.8 milestone Mar 13, 2026
@crazytonyli crazytonyli requested a review from kean March 13, 2026 08:36
@dangermattic
Copy link
Copy Markdown
Collaborator

1 Warning
⚠️ This PR is assigned to the milestone 26.8. This milestone is due in less than 4 days.
Please make sure to get it merged by then or assign it to a milestone with a later deadline.

Generated by 🚫 Danger

@sonarqubecloud
Copy link
Copy Markdown

@wpmobilebot
Copy link
Copy Markdown
Contributor

App Icon📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress
ConfigurationRelease-Alpha
Build Number31464
VersionPR #25376
Bundle IDorg.wordpress.alpha
Commit9c9dd80
Installation URL100deuh0q0tbg
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot
Copy link
Copy Markdown
Contributor

App Icon📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack
ConfigurationRelease-Alpha
Build Number31464
VersionPR #25376
Bundle IDcom.jetpack.alpha
Commit9c9dd80
Installation URL6a5uuhc46na80
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot
Copy link
Copy Markdown
Contributor

🤖 Build Failure Analysis

This build has failures. Claude has analyzed them - check the build annotations for details.

endpointType: details.toPostEndpointType(),
filter: filter.asPostListFilter(),
perPage: 20
perPage: 100
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This change causes an error, which is fixed in #25360.

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.

I'm just wondering if you tried different options to see which one is the most efficient? 20 seemed a bit low.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I did not notice any slowness in loading posts when using 100. Any specific tests you want to try?

Copy link
Copy Markdown
Contributor

@kean kean left a comment

Choose a reason for hiding this comment

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

Thank you, that should work. I'd probably go a step further and limit it to 100 – one page. It should make the implementation a bit simpler too.

endpointType: details.toPostEndpointType(),
filter: filter.asPostListFilter(),
perPage: 20
perPage: 100
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.

I'm just wondering if you tried different options to see which one is the most efficient? 20 seemed a bit low.

@crazytonyli crazytonyli added this pull request to the merge queue Mar 15, 2026
Merged via the queue into trunk with commit 1adb943 Mar 15, 2026
29 of 34 checks passed
@crazytonyli crazytonyli deleted the task/page-preload-fixed-amount branch March 15, 2026 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants