Skip to content

Inspector: Show source file of components and jump there in IntelliJ #158

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 2 commits into from
Mar 3, 2025

Conversation

Johni0702
Copy link
Contributor

This commit tries to track the source code location of components (not where its class is defined but where that particular instance was created) and shows that info in the inspector. Should the automatically determined location be unhelpful (e.g. because it's in a factory function rather than where the factory function is called), then it also allows scrolling while holding the Shift key to go up and down the call stack.

If IntelliJ is running, it will also automatically jump to that source location every time a component is selected in the inspector.

This commit tries to track the source code location of components (not
where its class is defined but where that particular instance was
created) and shows that info in the inspector. Should the automatically
determined location be unhelpful (e.g. because it's in a factory
function rather than where the factory function is called), then it also
allows scrolling while holding the Shift key to go up and down the call
stack.

If IntelliJ is running, it will also automatically jump to that source
location every time a component is selected in the inspector.
@Johni0702 Johni0702 force-pushed the feature/inspector-source-locations branch from 977abfb to 8f5cda9 Compare February 27, 2025 12:05
If we change the text in the same frame, Elementa will try to fit it
within the already computed width, rendering it smaller for a frame. So
we can only update it for the next frame.
@Johni0702 Johni0702 merged commit 2d61e23 into master Mar 3, 2025
1 check passed
@Johni0702 Johni0702 deleted the feature/inspector-source-locations branch March 3, 2025 07:12
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.

2 participants