Skip to content

refactor: Port measurement overlay to React #1411

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 18, 2025

Conversation

devin-ai-integration[bot]
Copy link
Contributor

Restores the alt to measure behavior using React components.

Fixes #958

  • Ports existing measurement logic to React
  • Maintains exact same behavior and appearance
  • Handles all edge cases for intersecting rectangles
  • Uses React patterns and hooks for state management

Link to Devin run: https://app.devin.ai/sessions/c1f09821f9c745028487d72f99b4b67c

Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add "(aside)" to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@@ -122,7 +122,7 @@ export const MeasurementOverlay: React.FC<MeasurementProps> = memo(({ fromRect,
const result: Distance[] = [];

// Scale values for display
const scaleValue = (value: number) => adaptValueToCanvas(Math.abs(value));
const scaleValue = (value: number) => adaptValueToCanvas(Math.abs(value), true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wtf it was just this? Thanks for spotting!

@Kitenite Kitenite merged commit 62cd51d into main Feb 18, 2025
@Kitenite Kitenite deleted the devin/1739780468-refactor-measurement-to-react branch February 18, 2025 04:51
ml-delaurier pushed a commit to ml-delaurier/nolook that referenced this pull request Apr 23, 2025
* refactor: Port measurement overlay to React

* fix: scale measurement values with webview transform

* fix: overlay scale

* refactor: remove deprecated measurement

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: vutnguyen <[email protected]>
t1c1 pushed a commit to t1c1/onlookbotcodes that referenced this pull request Jun 5, 2025
* refactor: Port measurement overlay to React

* fix: scale measurement values with webview transform

* fix: overlay scale

* refactor: remove deprecated measurement

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: vutnguyen <[email protected]>
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.

[feat] Restore the alt to measure behavior
2 participants