Skip to content

feat(sistent): refactor pagination to use dynamic GraphQL routing and remove content.js#7587

Open
rishiraj38 wants to merge 3 commits intolayer5io:masterfrom
rishiraj38:feat/sistent-dynamic-pagination
Open

feat(sistent): refactor pagination to use dynamic GraphQL routing and remove content.js#7587
rishiraj38 wants to merge 3 commits intolayer5io:masterfrom
rishiraj38:feat/sistent-dynamic-pagination

Conversation

@rishiraj38
Copy link
Copy Markdown
Member

Description

This PR fixes #7585 by replacing the hardcoded content.js array with a dynamic GraphQL useStaticQuery to automatically handle Sistent pagination.

This ensures that any newly added component or tab (overview, guidance, code) is instantly indexed and correctly ordered in the pagination workflow without requiring developers to manually update boilerplate arrays.

Changes Made

  • Deleted src/components/SistentNavigation/content.js to remove technical debt.
  • Updated SistentPagination to dynamically fetch all Sistent MDX nodes.
  • Implemented JS-filtering to ignore drafts (published: false), while successfully pulling grouped tabs (overview -> guidance -> code) belonging to published components.
  • Enforced a strict algebraic sort via componentSlug to guarantee proper alphabetical sequencing.

Signed commits

  • Yes, I signed my commits.

Signed-off-by: Rishi Raj <rishiraj438gt@gmail.com>
Copy link
Copy Markdown
Contributor

@YASHMAHAKAL YASHMAHAKAL left a comment

Choose a reason for hiding this comment

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

Looks good @rishiraj38

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.

[Sistent] Make Sistent navigation and pagination dynamic from MDX content

3 participants