mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7334] [MERGED] fix(client): keep avatar crop handles whole on square images #7685
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#7685
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7334
Author: @SpicyMarinara
Created: 10/9/2026
Status: ✅ Merged
Merged: 10/9/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/7323-crop-handles-square📝 Commits (7)
bf70f35fix(client): keep avatar crop handles whole on square images529f9actest(e2e): type the crop handle corner points745f598Merge origin/staging into fix/7323-crop-handles-square473f6bafix(client): stop crop handle touch targets scrolling the editor on phonesc9cc92eMerge origin/staging into fix/7323-crop-handles-square800b580Merge origin/staging into fix/7323-crop-handles-square4e90c78Move the CHANGELOG entry away from other open PRs📊 Changes
3 files changed (+181 additions, -70 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
e2e/avatar-preview.e2e.ts(+83 -0)📝
packages/client/src/components/ui/AvatarCropWidget.tsx(+97 -70)📄 Description
Linked issue
Closes #7323
Why this change
packages/client/src/components/ui/AvatarCropWidget.tsxput the crop overlay (frame outline, 44px touch targets and drawn handles) inside therelative overflow-hidden rounded-lgcanvas. Handles are centered on the crop corners, so whenever a corner touched the image edge, three quarters of the handle, most of its touch target and the frame outline were clipped, and the rounded corner clipped the rest. Wide and tall pictures had the same problem on their long edges.What changed
max-md:overflow-x-clip). Without that, the targets reached 24px past the stage and made the character and persona editors scroll sideways (scrollWidth 399 > 390 at 390px, 401 > 393 on iPhone 15 Pro). The drawn handles stay whole, the vertical reach is unchanged, and the desktop/tablet row layout keeps the full 44px reach.data-avatar-crop-frame/data-avatar-crop-handlehooks for the new browser test.e2e/avatar-preview.e2e.ts: a new test opens a character with a 1024x1024 avatar, checks that all four handles are at least 16px and whole and on top at each corner, checks that no ancestor of the crop frame scrolls sideways, then drags the outer edge of the bottom-right handle (the part that used to be clipped) to shrink the crop.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Agent-run checks:
pnpm checkpassed (localization, format, lint, e2e types, build).node ./scripts/run-regressions.mjs --filter scripts/regressions/avatar-crop-contract.regression.tspassed.playwright test e2e/avatar-preview.e2e.tspassed on desktop-chromium, mobile-chromium and mobile-webkit (6/6). The new crop-handle test was also run against the old layout (staging widget plus only the test hooks and a 16px handle): it failed with three of the four corners of the top-left handle clipped, so it pins this bug. Local CodeRabbit (coderabbit review --agent --committed) completed with 0 findings. The PR's browser e2e jobs are skipped on pull requests, so the browser test above only ran locally.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)UI evidence (if applicable)
Before (from the report): the handles are clipped to slivers in the image corners. After: the new browser test saves
square-crop-handles.pngin its test output.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.