-
-
Notifications
You must be signed in to change notification settings - Fork 6
feat: Add positioning: "relative|absolute" to View Hierarchy
#150
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
Conversation
Lms24
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM from my end! I asked the mobile team for their input as well
markushi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
| * `windows`: contains all visible windows, on mobile it's typically just one or two (e.g. if a dialog is open) | ||
| * `type`: The fully qualified widget class name, this name may be obfuscated on certain platforms (e.g. Android release builds with proguard enabled) | ||
| * `children` nests all child UI widgets, which then builds up the whole UI tree | ||
| * `positioning`: indicates how the element is positioned in relation to its parent. If not supplied, defaults to platform default. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where do we define the platform default? Can we add a link here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per, getsentry/sentry#107507, relative is the default and there is a small list of platforms overriding it.
- Ref getsentry/rfcs#150 Currently relative/absolute positioning for View Hierarchy wireframes is always relative unless the platform matches a predefined list: https://github.com/getsentry/sentry/blob/e07092c0583191c0a85e3f70a8d918920a569870/static/app/components/events/viewHierarchy/wireframe.tsx#L51-L54 This PR allows overriding the platform defaults via the root `positioning` property in the hierarchy data.
Currently relative/absolute positioning for View Hierarchy wireframes is always relative unless the platform matches a predefined list:
https://github.com/getsentry/sentry/blob/e07092c0583191c0a85e3f70a8d918920a569870/static/app/components/events/viewHierarchy/wireframe.tsx#L51-L54
SDKs should be able to override this without having to update this predefined list in Sentry.