Skip to content

Conversation

@andree-parakey
Copy link
Contributor

Description

Exposes react-arias routerOptions prop as a prop for untitled link buttons. Enables setting custom link behaviour provided by the router of choice.

Related issues

Closes #

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Style/UI change (visual improvements, no functional changes)
  • Accessibility improvement
  • Refactoring (code changes that neither fix a bug nor add a feature)
  • Performance improvement
  • Chore (dependency updates, tooling changes, etc.)

Testing

Manual testing in local environment. The following results in a link that does not reset scroll to top after clicking:

render(
  <Button href={'/settings#edit'} routerOptions={{ preventScrollReset: true }} />
)

Testing checklist

  • Functionality: Component works as expected
  • TypeScript: No TypeScript errors
  • Storybook: Stories render correctly
  • Accessibility:
    • Keyboard navigation works
    • Screen reader compatible
    • Focus management is correct
    • Color contrast meets WCAG AA standards
  • Responsive: Works on mobile, tablet, and desktop
  • Browser testing: Tested in multiple browsers
  • Performance: No performance regressions

Manual testing steps

  1. Install untitled in an environment with react-router-dom
  2. Render Button with href="#something" and routerOptions={{ preventScrollReset: true }}
  3. Clicking link button does not cause page to scroll to top.

Screenshots/Videos

Before

After

Code quality checklist

  • Code style: Follows project conventions
  • ESLint: No linting errors
  • Prettier: Code is properly formatted
  • TypeScript: Full type coverage
  • Imports: Uses correct import paths (@/components/...)
  • Performance: No unnecessary re-renders or heavy computations
  • Error handling: Appropriate error boundaries and validation

📚 Documentation

  • Component props are documented with TypeScript interfaces
  • Storybook stories cover all variants
  • Usage examples are provided

Breaking changes

Migration guide

Additional context

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.

1 participant