Skip to content

Conversation

@Linn-Devoteam
Copy link
Contributor

Pull Request

Description

This PR introduces a new Tabs component and restructures the app to include a LibraryPage that serves as the main entry point for exploring the component library.

Key changes:

  • Added a reusable Tabs component with keyboard navigation and ARIA roles (tablist, tab, tabpanel).
  • Styled Tabs with theme tokens, including active indicator and divider.
  • Added LibraryPage with three tabs: Overview, Components, Hooks.
  • Updated routing: LibraryPage is now the default route.
  • Refined App.tsx to delegate content rendering to LibraryPage.

How to test

  1. Install and start the project:

    • npm install
    • npm run dev
  2. Open localhost

    • Verify that the Tabs work:
    • Click between Overview, Components, Hooks.
    • Correct content should show for the active tab.
    • Use the keyboard to navigate:
    • ArrowRight / ArrowLeft moves focus and changes active tab.
    • Home jumps to the first tab, End to the last.
  3. Check accessibility:

    • When tabbing, the active tab shows a visible outline.
    • Inactive tab panels are hidden from screen readers (aria-hidden).
  4. Verify design:

    • Active tab is styled with primary color and underline indicator.
    • Inactive tabs show default text color.

Type of Change

  • feature: New feature
  • chore: Maintenance, dependency updates, or refactoring
  • test: Adding or improving tests
  • bug: Bug fix
  • docs: Documentation updates
  • Other (please specify):

Shortcut story

Related Issues

Testing Performed

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed

Screenshots/Recordings

Screenshot 2025-08-21 at 14 41 09

Checklist

  • My code follows the project's coding style guidelines
  • I have updated the documentation accordingly
  • I have added tests that prove my fix/feature works
  • All existing and new tests pass
  • I have checked for and resolved any merge conflicts
  • I have made corresponding changes to the README (if applicable)

Additional Notes

@@ -0,0 +1,21 @@
import { Typography as T } from '../../core/typography'
Copy link
Collaborator

Choose a reason for hiding this comment

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

the name of the file is LiberyPage, should be LibraryPage

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

export default function LibraryPage() {
return (
<>
<T.Heading3 style={{ margin: 20 }}>
Copy link
Collaborator

Choose a reason for hiding this comment

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

use token for margin

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

<T.Heading3 style={{ margin: 20 }}>
Welcome to React Vite Template
</T.Heading3>
<T.BodyBase style={{ margin: 20 }}>
Copy link
Collaborator

Choose a reason for hiding this comment

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

same as above

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Collaborator

Choose a reason for hiding this comment

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

is this file needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Deleted

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