Closed cervisebas closed 1 month ago
Recent changes have significantly improved the flexibility and usability of dropdown components by introducing new properties, including hideMenuHeader
and statusBarHeight
. These enhancements allow for better customization of the dropdown's appearance and behavior across various platforms, particularly optimizing layout on Android devices. The modifications preserve backward compatibility while reorganizing existing properties for enhanced clarity.
Files | Change Summary |
---|---|
README.md |
Added hideMenuHeader and statusBarHeight properties to DropdownProps and MultiSelectDropdownProps , rearranged property order for better readability. |
src/dropdown.tsx |
Introduced statusBarHeight for platform-specific handling, reorganized prop destructuring, and added conditional rendering for CustomMenuHeader . |
src/multi-select-dropdown.tsx |
Updated imports for platform handling, added statusBarHeight , adjusted prop order, and included conditional rendering for CustomMenuHeader . |
src/types.ts |
Enhanced DropdownProps and MultiSelectDropdownProps with new properties, maintaining existing functionality while improving configurability. |
sequenceDiagram
participant User
participant Dropdown
participant MultiSelectDropdown
User->>Dropdown: Selects option
Dropdown->>Dropdown: Checks hideMenuHeader
alt Menu header visible
Dropdown->>User: Show menu header
end
Dropdown->>Dropdown: Adjusts for statusBarHeight
Dropdown->>User: Displays options
User->>MultiSelectDropdown: Selects multiple options
MultiSelectDropdown->>MultiSelectDropdown: Checks hideMenuHeader
alt Menu header visible
MultiSelectDropdown->>User: Show menu header
end
MultiSelectDropdown->>MultiSelectDropdown: Adjusts for statusBarHeight
MultiSelectDropdown->>User: Displays options
š In a world of dropdowns, so neat and fine,
New options arise, like a sweet, sweet vine.
With headers that hide and heights that align,
Our menus are dancing, oh how they shine!
So hop with delight, let the features unfurl,
For a rabbit's joy is in this dropdown world! š„āØ
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
I would like to add the
hideMenuHeader
property to hide the menu header, so that it doesn't break the design of the applications.Also, as an additional feature, I would like to add the
statusBarHeight
property since in Android it happens that the height of the status bar is not calculated when it is translucent, here are some examples of this:Without
statusBarHeight
https://github.com/user-attachments/assets/efa246ec-8e28-4b1d-aea2-2a8ba74dc6d2
With
statusBarHeight
https://github.com/user-attachments/assets/e2fa37e9-bb20-477f-9573-7079edb494e7
Summary by CodeRabbit
New Features
hideMenuHeader
andstatusBarHeight
forDropdown
andMultiSelectDropdown
components, enabling better control over display and layout adjustments.Improvements
Documentation