-
Notifications
You must be signed in to change notification settings - Fork 279
feat: new activity section + fix profile betwen laptop tablet transition #5028
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've always had trouble in profile in between laptop/tablet breakpoints (closing the sidebar at this certain breakpoint gives us more room for the profile - which seems like a nice trade off.)
| useEffect(() => { | ||
| const mediaQuery = window.matchMedia(`(max-width: ${COLLAPSE_BREAKPOINT - 1}px)`); | ||
|
|
||
| const handleBreakpointChange = (e: MediaQueryListEvent) => { | ||
| if (e.matches && sidebarExpandedRef.current) { | ||
| toggleSidebarExpanded(); | ||
| } | ||
| }; | ||
|
|
||
| mediaQuery.addEventListener('change', handleBreakpointChange); | ||
| return () => mediaQuery.removeEventListener('change', handleBreakpointChange); | ||
| }, [toggleSidebarExpanded]); | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Best approach to do this as it only fires in breakpoint crossings
…-1071-activity-section-profile # Conflicts: # packages/shared/src/components/HorizontalScroll/HorizontalScrollHeader.tsx # packages/webapp/pages/[userId]/index.tsx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think we could actually do some CSS magic, but let's see :) approving so we can merge and re-see in another pr
Changes
Events
Did you introduce any new tracking events?
Experiment
Did you introduce any new experiments?
Manual Testing
Caution
Please make sure existing components are not breaking/affected by this PR
Jira ticket
MI-1071
Preview domain
https://mi-1071-activity-section-profile.preview.app.daily.dev