Visitar URL original
feat(devtools): implement inspect functionality for directives by sbrshkappa · Pull Request #47334 · angular/angular · GitHub
The Wayback Machine - https://web.archive.org/web/20220926194930/https://github.com/angular/angular/pull/47334
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

feat(devtools): implement inspect functionality for directives #47334

Closed

Conversation

sbrshkappa
Copy link
Contributor

@sbrshkappa sbrshkappa commented Sep 2, 2022 •

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

Devtools Feature

What is the current behavior?

Previously, you could inspect the source code of a component but not a directive.

Issue Number: #45882

What is the new behavior?

This commit adds functionality to inspect source code for directives as well. Now you will see the inspect icon on the header component of each directive on a selected element.

Does this PR introduce a breaking change?

  • Yes
  • No

@pullapprove pullapprove bot requested a review from AleksanderBodurri Sep 2, 2022
@ngbot ngbot bot added this to the Backlog milestone Sep 2, 2022
@sbrshkappa sbrshkappa force-pushed the sk-view-source-directives branch from 227db72 to b161d6b Compare Sep 2, 2022
Copy link
Member

@AleksanderBodurri AleksanderBodurri left a comment

It was nice meeting you at NG Conf 😄 Thanks for the PR. I left a couple of comments to be resolved but overall this looks good to me

@pullapprove pullapprove bot requested a review from AleksanderBodurri Sep 7, 2022
@sbrshkappa
Copy link
Contributor Author

sbrshkappa commented Sep 7, 2022

It was nice meeting you at NG Conf 😄 Thanks for the PR. I left a couple of comments to be resolved but overall this looks good to me

Absolutely! Great meeting you as well. Helps to work in person, to get things moving quickly.

@sbrshkappa
Copy link
Contributor Author

sbrshkappa commented Sep 8, 2022

@AleksanderBodurri I have the changes merged, I did a combination of using the github "Apply changes" and committing the other changes from my local. Hopefully the branch looks good. Let me know.

@sbrshkappa sbrshkappa force-pushed the sk-view-source-directives branch 3 times, most recently from 0f0c0ec to f86b36d Compare Sep 8, 2022
@angular-robot angular-robot bot added flag: breaking change comp: docs Anything related to doc content, incl guides, API reference, tutorial, web content labels Sep 8, 2022
@sbrshkappa
Copy link
Contributor Author

sbrshkappa commented Sep 8, 2022

@AleksanderBodurri , I accidentally did some merge that messed up this branch, can you help with fixing this?

@AleksanderBodurri
Copy link
Member

AleksanderBodurri commented Sep 11, 2022

Backup your branch just in case

git checkout -b view-source-directive-bkp
git checkout sk-view-source-directives

You can reset to a branch with only your commits by:

# reset softly to the commit right before 7f3180e and f86b36d
git reset --soft 0dc66120f053e610398cbdba61b6951ce77ee5b4
# stash the changes from 7f3180e and f86b36d
git stash
# reset hard to right before the merge 
git reset --hard 3cf56797ca
# pop stash to bring back the changes from 7f3180e and f86b36d
git stash pop
# make new commit with the changes from 7f3180e and f86b36d
git add .
git commit
# update remote branch
git push -f

@sbrshkappa
Copy link
Contributor Author

sbrshkappa commented Sep 11, 2022

Thank you for the detail steps, @AleksanderBodurri. The branch should be back in the original state.

@AleksanderBodurri
Copy link
Member

AleksanderBodurri commented Sep 11, 2022

Awesome 😄 The last thing I would suggest is that you squash your 3 commits into 1. You can do this anyway you're comfortable with, I'll leave a description of how I would do this below for reference.

Run the following in your terminal

git rebase -i main

and then change the pick next to 0597b8f and 3cf5679 to fixup or f. Saving this file will cause the rebase to fixup these 2 commits onto b161d6b. Then update your remote branch with git push -f.

Previously, you could inspect the source code of a component but not a directive. This commit adds functionality to inspect source code for directives as well. Now you will see the inspect icon on the header component of each directive on a selected element.
@sbrshkappa sbrshkappa force-pushed the sk-view-source-directives branch from 0597b8f to 4dc1f60 Compare Sep 12, 2022
@sbrshkappa
Copy link
Contributor Author

sbrshkappa commented Sep 12, 2022

@AleksanderBodurri . Done!

Copy link
Member

@AleksanderBodurri AleksanderBodurri left a comment

LGTM

@pullapprove pullapprove bot requested a review from AleksanderBodurri Sep 13, 2022
@AleksanderBodurri AleksanderBodurri added action: merge PR author is ready for this to merge target: patch This PR is targeted for the next patch release and removed comp: docs Anything related to doc content, incl guides, API reference, tutorial, web content labels Sep 13, 2022
@pullapprove pullapprove bot requested a review from AleksanderBodurri Sep 19, 2022
@AleksanderBodurri AleksanderBodurri added target: minor This PR is targeted for the next minor release and removed target: patch This PR is targeted for the next patch release labels Sep 19, 2022
@pullapprove pullapprove bot requested a review from AleksanderBodurri Sep 19, 2022
Copy link
Member

@AleksanderBodurri AleksanderBodurri left a comment

Reviewed-for: devtools

@pullapprove pullapprove bot requested a review from AleksanderBodurri Sep 19, 2022
Copy link
Member

@josephperrott josephperrott left a comment

LGTM

@josephperrott josephperrott removed the request for review from AleksanderBodurri Sep 19, 2022
@pkozlowski-opensource
Copy link
Member

pkozlowski-opensource commented Sep 19, 2022

This PR was merged into the repository by commit 32cad55.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: merge PR author is ready for this to merge comp: devtools target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants