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

How to view dimensions (height/width etc.) of an element #52

Closed
jordanmkoncz opened this issue Mar 6, 2017 · 9 comments
Closed

How to view dimensions (height/width etc.) of an element #52

jordanmkoncz opened this issue Mar 6, 2017 · 9 comments

Comments

@jordanmkoncz
Copy link

I've been using react-native-debugger without any issues for a while now, but one thing I haven't been able to figure out is how to view the dimensions (height/width etc.) of an element. When I click on an element in the hierarchy, the side panel shows the element name, props, and applied styles, but I can't find any way to see the actual rendered dimensions of the element. This is something that was possible to view when using the built in react-native inspector.

React Native version: 15.4.0
Platform: iOS
Is real device of platform: No, Simulator
Operating System: macOS

@thurt
Copy link

thurt commented Mar 6, 2017

curious about this as well. chrome devtools calls this "computed" styles when inspecting regular web css

@jhen0409
Copy link
Owner

jhen0409 commented Mar 7, 2017

Currently we can change this line to keep the built-in inspector contents, I may try to PR for show / hide the contents.

The goal is show the information in react-devtools, I think it's possible to make plugin for RN on here.

@jordanmkoncz
Copy link
Author

jordanmkoncz commented Mar 14, 2017

@jhen0409 Yeah if there was some way to view the built in react-native inspector that shows this information already, that would be great.

@jhen0409
Copy link
Owner

I simply implemented it in facebook/react-devtools#590, hope this feature can be landed in the future. :)

@jordanmkoncz
Copy link
Author

@jhen0409 Okay great, thanks for that. I guess now we just wait for your pull request to be included in an upcoming release.

@jhen0409
Copy link
Owner

Released as v0.6.4. 🎉

@jordanmkoncz
Copy link
Author

@jhen0409 How do you view the dimensions? I've got the latest version but I'm not sure how to see the dimensions.

@jhen0409
Copy link
Owner

@jordanmkoncz you need ensure react-devtools-core version is ^2.1.0 in your RN project (use npm list react-devtools-core check it), it's dependency of react-native. (starts with v0.43)

Inspect the measurable nodes, it should shown on React Native Style Editor.

@jordanmkoncz
Copy link
Author

@jhen0409 Ah I see, my project is currently using React Native v0.41.2. I guess I'll have to upgrade to the latest version then! Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants