fix: ensure side panel closes on outside click on mobile device#73
fix: ensure side panel closes on outside click on mobile device#73rahulptl165 wants to merge 2 commits intostdlib-js:masterfrom
Conversation
| * @returns {ReactElement} React element | ||
| */ | ||
| render() { | ||
| const isMobile = typeof window !== 'undefined' && window.innerWidth <= 640; |
There was a problem hiding this comment.
I believe we already check whether the device is a mobile device. If so, we should be pushing that down, rather than creating this sort of custom check.
There was a problem hiding this comment.
I will check the codebase to see if we can utilize the existing mobile device check, and update my pull request shortly.
|
To help with PR review, it would help if you can provide screenshots and/or GIFs demonstrating new UI behavior. Otherwise, it is hard to know whether the changes introduced in this PR are what is desired. |
|
I have updated the pull request to include a video demonstrating the new UI behavior. |
|
Hi @kgryte, I have update the code to use viewport-width module for mobile detection as it is implemented in app.jsx. its working same as shown in video. |
Resolves #50 .
Checklist
master.masterbranch.Description
This PR enhances the
SideMenucomponent to enure side panel closes on outside click on mobile device.This pull request:
Drawercomponent to switch betweenpersistentandtemporaryvariants based on screen width (<= 640pxis considered mobile).onClosebehavior: only triggers on mobile when theDraweris temporary.max-width: 640px.Related Issues
This pull request:
Questions
No.
Other
Video
Screen.Recording.2025-03-08.153138.1.mp4
No.
@stdlib-js/reviewers