Skip to content

Conversation

@shleewhite
Copy link
Contributor

@shleewhite shleewhite commented Oct 7, 2025

📌 Summary

If merged, this PR would convert the pagination showcase page to gts.

This page is one of the few examples where we need to keep the controller file because it uses queryParams in 2 of the demos. An unexpected benefit of breaking up the page into sub-components means these demos are actually more in line with how consumers implement these UIs.

The source of truth for the state is in the URL, the controller only contains the list of queryParams + tracked copy of the param. Then in the component, when something (like page size) changes, you transition to the same URL and update the appropriate params which causes the tracked state in the controller to change and then makes the component re-render.

Passing the controller to the sub components is the easiest way to get the current state of the query params to the appropriate place.

Note: I had to update the acceptance tests a bit to match the new query param names + ids.

🔗 External links

Jira ticket: HDS-5348


👀 Component checklist

  • Percy was checked for any visual regression

💬 Please consider using conventional comments when reviewing this PR.

📋 PCI review checklist
  • If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.
  • If applicable, I've worked with GRC to document the impact of any changes to security controls.
    Examples of changes to controls include access controls, encryption, logging, etc.
  • If applicable, I've worked with GRC to ensure compliance due to a significant change to the in-scope PCI environment.
    Examples include changes to operating systems, ports, protocols, services, cryptography-related components, PII processing code, etc.

@vercel
Copy link

vercel bot commented Oct 7, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
hds-showcase Ready Ready Preview Oct 10, 2025 4:55pm
hds-website Ready Ready Preview Oct 10, 2025 4:55pm

onTableSort = (sortBy: string, sortOrder: HdsTableThSortOrder) => {
this.currentSortBy = sortBy;
this.currentSortOrder = sortOrder;
// should we reset the selected page?
Copy link
Contributor

Choose a reason for hiding this comment

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

[Note] I think it makes sense to reset it, but also fine to leave it as is since that's what's been done currently.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I agree we should reset it. @didoo do you have thoughts? This comment was brought over from the existing pagination showcase page.

@dchyun
Copy link
Contributor

dchyun commented Oct 10, 2025

Approved the Percy diff, as it looked all as expected 🟢

@shleewhite shleewhite force-pushed the hds-5348/showcase-pagination-gts branch from e8ea7bf to 7fd0728 Compare October 10, 2025 16:51
@shleewhite shleewhite merged commit c0fbf47 into main Oct 10, 2025
22 of 23 checks passed
@shleewhite shleewhite deleted the hds-5348/showcase-pagination-gts branch October 10, 2025 20:46
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