Closed Southclaws closed 1 month ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
storyden | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Oct 15, 2024 8:30pm |
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
This adds a separate asset relation to library pages: primary image, or "cover image" which acts as a hero section header for library pages.
This also introduces the concept of assets having version history. The need for this was because when a cover image is cropped, the original is still needed in order to facilitate future edits to the crop.
from discord:
this, it's a fixed height but obviously dynamic width, so you can drop an image in and move it around a bit so it's positioned nicely
hard part: because the width is dynamic, the cropped coordinates are invalid for that use-case
img has object-fit/object-position, but the coordinate space is different because it's dependent screen space coordinates not image space coordinates
so I think the only solution is to store two images, one is the original and the other is the cropped version (which can be deleted/replaced when the original is edited)
when you enter edit mode, it loads the original image and when it's rendered for reading, it loads the cropped image
So now I'm wondering if it makes sense to add a recursive backreference to Assets for change versioning :thinkthonk: