Skip to content

Refactor HeaderCrop component to fix zoom functionality#1079

Merged
laurgk merged 21 commits intomainfrom
feature/fet-2590-app-v3-header-zoom-is-unresponsive
Jan 8, 2026
Merged

Refactor HeaderCrop component to fix zoom functionality#1079
laurgk merged 21 commits intomainfrom
feature/fet-2590-app-v3-header-zoom-is-unresponsive

Conversation

@storywithoutend
Copy link
Copy Markdown
Contributor

  • Simplified HeaderCrop.tsx by removing custom hooks pattern and following AvatarCrop.tsx structure
  • Fixed zoom functionality that was previously broken due to infinite rerenders
  • Renamed avatar parameter to header for better semantic clarity
  • Updated HeaderCancelButton (previously AvCancelButton) and test IDs
  • Removed unnecessary error handling and complexity
  • All tests passing with proper 3:1 aspect ratio support

🤖 Generated with Claude Code

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Nov 3, 2025

Deploying ens-app-v3 with  Cloudflare Pages  Cloudflare Pages

Latest commit: a0f4e3e
Status: ✅  Deploy successful!
Preview URL: https://b2faaf2b.ens-app-v3.pages.dev
Branch Preview URL: https://feature-fet-2590-app-v3-head.ens-app-v3.pages.dev

View logs

storywithoutend and others added 13 commits November 21, 2025 10:44
…ode structure

- Simplified HeaderCrop.tsx by removing custom hooks pattern and following AvatarCrop.tsx structure
- Fixed zoom functionality that was previously broken due to infinite rerenders
- Renamed avatar parameter to header for better semantic clarity
- Updated HeaderCancelButton (previously AvCancelButton) and test IDs
- Removed unnecessary error handling and complexity
- All tests passing with proper 3:1 aspect ratio support

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Alphabetize named imports from HeaderCrop to follow ESLint conventions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Change dialog title translation key from 'header.image.title' to
'avatar.image.title' to match the correct translation namespace.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…ning

Added ImageCropGuides component with rule-of-thirds grid overlay:
- Vertical lines at 1/3 intervals for horizontal composition
- Horizontal lines at 25%/75% for 6:1 aspect ratio (25% 50% 25% distribution)
- Semi-transparent accent-colored guides to assist with image cropping

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add AspectRatioLabel, OuterRatioLabel, and InnerRatioLabel styled components
- Display 3:1 label for outer crop frame and 6:1 label for inner grid lines
- Add tests to verify both aspect ratio labels are displayed
- Labels positioned at top-right with semi-transparent background for visibility

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…normal

Corrects type error in AspectRatioLabel styled component where theme.fontWeights.medium was used but doesn't exist in the theme. Valid fontWeights are: light, normal, bold, extraBold.

Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…ignment

Move the inner (6:1) aspect ratio label from top: 28% to top: 26% to position
it closer to the horizontal guide line at 25%, improving the visual association
between the label and its corresponding guide line.

Tested across multiple screen sizes (800x600, 1920x1080) to ensure consistent
positioning and readability.

Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Add aria-label attributes to the 3:1 and 6:1 aspect ratio labels in the HeaderCrop component to improve accessibility for screen readers.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Move aspect ratio labels from right: 12% to left: 12% to position them
on the left side of the crop frame for better visual alignment.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Reposition labels from left: 12% to left: 1% to place them outside
the crop frame boundary (which starts at 10% from left), improving
visual separation between labels and cropping area.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Change label positioning from left-anchored to right-anchored (right: 90%)
to maintain consistent spacing from the crop frame's left edge (at 10%)
as the page size changes. This ensures labels stay properly aligned with
the crop frame boundary across all viewport sizes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Update vertical positioning to match crop frame structure:
- OuterRatioLabel (3:1): top: 10% - aligns with outer crop frame boundary
- InnerRatioLabel (6:1): top: calc(10% + 80% * 0.25) - aligns with first
  horizontal grid line at 30%

This ensures consistent vertical spacing that matches the crop guide
positioning system.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add BottomInnerRatioLabel and BottomOuterRatioLabel styled components
- Position labels on bottom two grid lines matching top labels style
- Update .gitignore to exclude .playwright-mcp directory

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@storywithoutend storywithoutend force-pushed the feature/fet-2590-app-v3-header-zoom-is-unresponsive branch from 2836ede to 03744a0 Compare November 21, 2025 02:44
storywithoutend and others added 4 commits November 21, 2025 11:13
- Break long lines for BottomInnerRatioLabel and BottomOuterRatioLabel
- Ensures build passes without prettier errors

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Change vertical lines from 1/3 intervals to 25%/75% positions
- Creates balanced 25% 50% 25% distribution matching horizontal lines
- Provides more centered focal area in the crop frame

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
storywithoutend and others added 2 commits December 5, 2025 09:04
The component displays two 3:1 and two 6:1 aspect ratio labels
(top and bottom of the crop frame), so tests must use getAllByText
instead of getByText to handle multiple matching elements.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Dec 5, 2025

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Jan 8, 2026

@laurgk laurgk merged commit 5541991 into main Jan 8, 2026
48 checks passed
@laurgk laurgk deleted the feature/fet-2590-app-v3-header-zoom-is-unresponsive branch January 8, 2026 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants