Closed lin-d-hop closed 1 year ago
Menu swipe now works fine on staging. In a comparison between live and staging on both tablet and mobile, the problem persists on live (though less so on tablet), but not on staging. Either this was already fixed on staging (an oversight on my part, any further site audits I undertake will include an inspection of both staging and live) or was corrected subsequent to my previous sweep.
However, I did notice the below on tablet. I seem to remember discovering this previously but I missed it from my write-up.
I can only replicate this on an actual device, however, not it chrome dev tools or using the mobile simulator browser extension.
Conditional closes added to ProfilePic.js
onClick={() => {
analytics.event(analytics._event.USER_MENU, "Open");
dispatch({ type: "TOGGLE_MENU_PROFILE" });
// Close left pane if mobile and tool is active
if (activeTool != "" && isMobile) dispatch({ type: "CLOSE_TRAY" });
}}
and LeftPane.js
const clickIcon = (tray) => {
active === tray
? dispatch({ type: "CLOSE_TRAY" })
: dispatch({ type: "SET_ACTIVE", payload: tray });
// Close profile menu if open and mobile
if (profileMenuOpen && isMobile) dispatch({ type: "CLOSE_MENU_PROFILE" });
};
Resolved using globalEventOff as in below issue: https://github.com/ReactTooltip/react-tooltip/issues/203
Added a click outside custom hook
As with the first issue this seem to have been resolved on staging.
Description
In #231 the following issues with menus were uncovered:
Let's fix them :)
Acceptance Criteria