Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Fix: changing maxPageListLength from 3 to 7 to match CMS #886

Merged
merged 3 commits into from
Feb 18, 2025

Conversation

moanu404
Copy link
Contributor

@moanu404 moanu404 commented Feb 13, 2025

Description

Currently in prod CMS this field is set to 7 but in next-build it was set and hardcoded to 3, This PR is changing this in next-build to 7 to better match what is currently in prod, and adding it as a constant so in future we only have to change it in one place instead of a few as we scale this thing out.

Ticket

Closes to #19849

Developer Task

Tasks

Preview Give feedback

Testing Steps

For local testing load up
http://localhost:3999/boston-health-care/news-releases/
http://localhost:3999/boston-health-care/stories/ (although this one does not have enough pages to see a difference)
and ensure that at the bottom the component upon inspection is like
image

QA steps

Check the footer, ensure it works

Screenshots

Before:
image

After:
image

Is this PR blocked by another PR?

  • Add the DO NOT MERGE label
  • Add links to additional PRs here:

Reviewer

Reviewing a PR

This section lists items that need to be checked or updated when making changes to this repository.

Standard Checks

Tasks

Preview Give feedback

Merging an Approved Layout

When merging a layout, you must ensure that the content type has been turned on for next-build inside the CMS. This CMS flag must be turned on for editors to preview their work using the next build preview server.

Resource types (layouts) that have not been approved by design should NOT be pushed to production. Ensure that slug.tsx does not include your resource type if it is not approved.

The status of layouts should be kept up to date inside templates.md. This includes QA progress, development progress, etc. A link should be provided for where testing can occur.

Merging a Non-Approved Layout

Your new resource type should not be included inside slug.tsx. Items added here will go into production once merged into the main branch. It is imperative that we do not push anything live that has not been approved.

Ensure that this layout has been added to the templates.md file with the current status of the work.

@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 13, 2025 22:34 Destroyed
@moanu404 moanu404 marked this pull request as ready for review February 15, 2025 00:00
@moanu404 moanu404 requested review from a team as code owners February 15, 2025 00:00
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 15, 2025 00:00 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 15, 2025 00:13 Destroyed
@@ -0,0 +1 @@
export const DEFAULT_PAGE_LIST_LENGTH = 8
Copy link
Contributor

Choose a reason for hiding this comment

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

nice!

@brianseek
Copy link
Contributor

brianseek commented Feb 15, 2025

@moanu404 this looks great to me. The only thing I notice is that prod shows 5 pages rather than 8, not sure if this is the new desired amount or if it is supposed to match prod. https://www.va.gov/boston-health-care/news-releases/

Screenshot 2025-02-14 at 4 39 26 PM

@moanu404
Copy link
Contributor Author

@moanu404 this looks great to me. The only thing I notice is that prod shows 5 pages rather than 8, not sure if this is the new desired amount or if it is supposed to match prod. https://www.va.gov/boston-health-care/news-releases/

Screenshot 2025-02-14 at 4 39 26 PM

no you are right, and great catch! I def looked at another field and stored it in my 🧠 and then ran with it

image looks like the correct`maxPageListLength` seems to be 7 when i inspect it

@brianseek
Copy link
Contributor

looks like the correctmaxPageListLength seems to be 7 when i inspect it

Oh that makes sense, it's 7 spaces including the last page and ...

@moanu404 moanu404 requested a review from brianseek February 18, 2025 18:24
@@ -0,0 +1 @@
export const DEFAULT_PAGE_LIST_LENGTH = 8
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this get changed to 7?

@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 18, 2025 18:31 Destroyed
Copy link
Contributor

@brianseek brianseek left a comment

Choose a reason for hiding this comment

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

Looks great!

@moanu404 moanu404 changed the title Bug Fix: changing maxPageListLength from 3 to 8 to match CMS Bug Fix: changing maxPageListLength from 3 to 7 to match CMS Feb 18, 2025
@moanu404 moanu404 merged commit 33901b4 into main Feb 18, 2025
9 of 10 checks passed
@moanu404 moanu404 deleted the moanu0404/pagination_max_list_length_fix branch February 18, 2025 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants