Skip to content

Conversation

@balajis-qb
Copy link
Contributor

@balajis-qb balajis-qb commented Nov 25, 2025

Description

In this PR, I enhanced the readability of the doc-sites examples by removing the redundant code.

Changes

  • Removed the redundant wrapper onChange event handlers from all the examples
  • Extracted the custom header rendering logic into a separate function, renderHeader to make the TSX clean
  • Update the custom types more readable

Contribution checklist

  • I have followed the contributing guidelines.
  • I have formatted my code with Prettier and checked for linting issues with ESLint for code readability.

…tly in examples

Updated multiple DatePicker components across various example files to simplify the onChange handler by directly using setSelectedDate instead of wrapping it in an arrow function. This change enhances code readability and consistency and avoid the unnecessary wrapper
…dability

Extracted the custom header rendering logic into a separate function, renderHeader, to enhance code clarity and maintainability in the RenderCustomHeaderTwoMonths example. This change simplifies the DatePicker component's renderCustomHeader prop.
…andling

Updated the handleChangeRaw function to accept a more specific event type and simplified the onChangeRaw prop by directly passing the handler. This change enhances code clarity and maintains consistency in event handling across the DatePicker examples.
Updated various TypeScript type definitions across multiple example files to use `Array<{}>` syntax for better clarity and uniformity. This change enhances code readability and maintains consistency in how date-related types are defined throughout the documentation examples.
@codecov
Copy link

codecov bot commented Nov 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.91%. Comparing base (1122aba) to head (5c7eb82).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6040   +/-   ##
=======================================
  Coverage   98.91%   98.91%           
=======================================
  Files          30       30           
  Lines        3496     3496           
  Branches     1470     1490   +20     
=======================================
  Hits         3458     3458           
  Misses         37       37           
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@martijnrusschen martijnrusschen merged commit fd145a4 into Hacker0x01:main Nov 25, 2025
6 checks passed
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