Skip to content
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

fix: use global frame on wireframe views #250

Merged
merged 6 commits into from
Nov 18, 2024
Merged

Conversation

ioannisj
Copy link
Contributor

@ioannisj ioannisj commented Nov 14, 2024

💡 Motivation and Context

Closes #231

This issue was a bit challenging to uncover, but the solution turned out to be quite straightforward. After digging into the frontend code, I realized we always use position: fixed when styling nodes. To ensure the wireframe renders correctly, we need to convert all view frames to global screen coordinates.

Before

before

After

after

💚 How did you test it?

Locally with some sample projects

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • I updated the docs if needed.
  • No breaking change or entry added to the changelog.

@ioannisj
Copy link
Contributor Author

added isParentSensitive (over isParentMasked). Since in the case of UIButton we don't do any actual masking in the parent I find it more descriptive

Copy link
Member

@marandaneto marandaneto left a comment

Choose a reason for hiding this comment

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

Left a last comment but feel free to make your judgment LGTM

@marandaneto marandaneto merged commit 30e3ef0 into main Nov 18, 2024
6 checks passed
@marandaneto marandaneto deleted the fix/mangled-wireframes branch November 18, 2024 10:33
@@ -448,6 +453,8 @@
wireframe.disabled = !button.isEnabled

if let text = button.titleLabel?.text {
// NOTE: this will create a ghosting effect since text will also be captured in child UILabel
Copy link
Member

Choose a reason for hiding this comment

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

will create an issue

Copy link
Member

Choose a reason for hiding this comment

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

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.

Wireframe Session Recording appears mangled
2 participants