fix(web): show homebrew section only on desktop macOS#2138
fix(web): show homebrew section only on desktop macOS#2138ComputelessComputer merged 1 commit intomainfrom
Conversation
Use usePlatform hook instead of manual UA parsing to properly
distinguish desktop macOS from mobile devices (iOS). The previous
implementation using navigator.userAgent.includes('mac') would
incorrectly show the homebrew section on iOS devices.
Co-Authored-By: john@hyprnote.com <john@hyprnote.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
✅ Deploy Preview for hyprnote ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Warning Rate limit exceeded@ComputelessComputer has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 13 minutes and 9 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ Deploy Preview for hyprnote-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Summary
The homebrew section on the download page was incorrectly showing on iOS devices because the previous implementation used
navigator.userAgent.toLowerCase().includes("mac"), which matches iOS Safari's user agent string (which contains "Mac" on newer iOS versions).This PR switches to using the existing
usePlatformhook, which properly distinguishes desktop macOS from mobile devices by checking for mobile UA patterns first.Review & Testing Checklist for Human
usePlatformhook logic: The hook atsrc/hooks/use-platform.tschecks for mobile patterns before checking for "mac" - verify this logic is correct for all iOS UA stringsTest Plan
Notes
The user also reported a scroll snap issue on the download page's mobile view, but I couldn't find any
scroll-snapCSS on the/downloadroute (only on the home page carousels). I'll follow up to clarify whether this is referring to a different page or a browser-specific behavior.Requested by: john@hyprnote.com (@ComputelessComputer)
Link to Devin run: https://app.devin.ai/sessions/3dd9e7eb56b64c6eb674942b2e9fe6c4