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

Context menu item for inspecting components #843

Merged
merged 4 commits into from Jul 28, 2018

Conversation

Bestra
Copy link
Contributor

@Bestra Bestra commented Jul 27, 2018

context_menu
Features:

thorsteinsson and others added 2 commits July 27, 2018 13:24
Relying on the `emberVersion` message as the trigger point for setting
the context menu isn't always reliable.
@Bestra
Copy link
Contributor Author

Bestra commented Jul 27, 2018

This PR pretty much adds an extra commit or two onto the work that @thorsteinsson already did, so the credit is firmly his.

When an item is inspected via the context menu we try to put it into
view in the component tree.  We make an educated guess as to how far
down we should scroll based on the item's index and a magic height
number
@RobbieTheWagner
Copy link
Member

Nice work @thorsteinsson and @Bestra! I hate to ask, but any chance we could get some test coverage for this feature? 😄

@Bestra
Copy link
Contributor Author

Bestra commented Jul 27, 2018

@rwwagner90 😅 I can probably write an acceptance test that takes an incoming message from the port and highlights a given item. I think that'll cover the happy path for the real thing. Off I go

Copy link
Member

@RobbieTheWagner RobbieTheWagner left a comment

Choose a reason for hiding this comment

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

This seems great to me! 🎉

@RobbieTheWagner RobbieTheWagner merged commit cc9edff into emberjs:master Jul 28, 2018
@thorsteinsson
Copy link
Member

Great work @Bestra! I'm so happy to see this land.

cyril-sf pushed a commit to cyril-sf/ember-inspector that referenced this pull request Mar 30, 2022
* Context menu item for "Inspect Ember Component"

* Try to set context menu when inspector loads

Relying on the `emberVersion` message as the trigger point for setting
the context menu isn't always reliable.

* Scroll component tree to selected item

When an item is inspected via the context menu we try to put it into
view in the component tree.  We make an educated guess as to how far
down we should scroll based on the item's index and a magic height
number

* Add specs for inspecting item via context menu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants