Skip to content

Conversation

@Yeom-JinHo
Copy link
Contributor

Description

This PR refactors the DocsNavigation pagination logic to enable group-based navigation.
Previously, navigation followed the raw order of config/docs.ts, resulting in an inconsistent sequence across unrelated components.
Now, navigation prioritizes movement within the same group, and once a group ends, it automatically continues to the next group.

Changes

  • Group-Based Pagination: Added logic to handle prev/next transitions within each group, then proceed to the next or previous group when reaching boundaries.
  • Consistent Order: Navigation is no longer based on the raw array order of config/docs.ts; it now respects logical grouping.
  • Simplified Logic: Implemented a reduce + flat structure for cleaner and more maintainable iteration.
  • Type Safety: Explicitly defined types (Record<string, DocsNavigationCategory[]>) to remove @ts-ignore and ensure stable autocomplete.

Motivation

To eliminate inconsistent navigation caused by the arbitrary order of config/docs.ts and align pagination with the actual component grouping.
This makes the browsing experience more structured — allowing users to explore related components together before moving on to the next group.

@naymurdev naymurdev merged commit 012e678 into ui-layouts:main Oct 20, 2025
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.

2 participants