fix: show static.webp fallback for mobile features carousel#2046
Conversation
Features without images (Coming Soon features) now display the static.webp fallback in mobile view, matching the desktop grid behavior. 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-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for hyprnote ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Possibly related PRs
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
apps/web/src/routes/_view/index.tsx (1)
1223-1234: Mobile features carousel fallback looks correct; confirm intendedobject-coverbehaviorThe new
feature.image ? <Image> : <img static.webp>ternary cleanly fixes the missing-image case in the mobile features carousel and matches the desktop Features fallback source/alt pattern. No functional issues here.One small thing to double-check: this fallback uses
object-cover, while:
- The main
Imagestill usesobject-contain, and- Other carousels’ static.webp fallbacks (e.g.,
DetailsMobileCarousel,DetailsTabletView,DetailsDesktopView) mostly useobject-contain.If the design intent is consistent cropping behavior across all carousels, you may want to align these; if not, this is fine as-is.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
apps/web/src/routes/_view/index.tsx(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx}: Avoid creating a bunch of types/interfaces if they are not shared. Especially for function props, just inline them instead.
Never do manual state management for form/mutation. Use useForm (from tanstack-form) and useQuery/useMutation (from tanstack-query) instead for 99% of cases. Avoid patterns like setError.
If there are many classNames with conditional logic, usecn(import from@hypr/utils). It is similar toclsx. Always pass an array and split by logical grouping.
Usemotion/reactinstead offramer-motion.
Files:
apps/web/src/routes/_view/index.tsx
🧬 Code graph analysis (1)
apps/web/src/routes/_view/index.tsx (1)
apps/web/src/components/image.tsx (1)
Image(4-24)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: Redirect rules - hyprnote
- GitHub Check: Header rules - hyprnote
- GitHub Check: Pages changed - hyprnote
- GitHub Check: Devin
- GitHub Check: ci
- GitHub Check: fmt
Summary
Fixed an issue where the static gif/webp fallback was not showing for features without images in the mobile view of the features section.
The
FeaturesDesktopGridcomponent already had a fallback to display/api/images/hyprnote/static.webpwhen a feature doesn't have an image (e.g., "Coming Soon" features like Floating Panel and Daily Note). However,FeaturesMobileCarouselwas only conditionally rendering whenfeature.imageexisted, leaving an empty container for features without images.This change adds the same fallback pattern to the mobile carousel, making it consistent with the desktop grid behavior.
Review & Testing Checklist for Human
object-coverstyling looks appropriate on mobile screensNotes