Commit graph

296 commits

Author SHA1 Message Date
AleksanderBodurri
a6148608c3 feat(devtools): open expansion panels by default; apply styling to expansion header 2020-03-22 19:59:30 -07:00
AleksanderBodurri
11c1cb01f7 refactor(devtools): replace label arrays with sets because Set.has is much faster than Array.includes 2020-03-22 19:59:30 -07:00
AleksanderBodurri
789c872ada refactor(devtools): type propPointer and drag event properly 2020-03-22 19:59:30 -07:00
AleksanderBodurri
95dcad328f refactor(devtools): clean up directive property resolver methods 2020-03-22 19:59:30 -07:00
AleksanderBodurri
820ec85ea4 fix(devtools): pass property updates to the correct data sources 2020-03-22 19:59:30 -07:00
AleksanderBodurri
3a6b5b0bd9 refactor(devtools): remove old unused methods from property tab body, client event subscribers, and directive property resolver 2020-03-22 19:59:30 -07:00
AleksanderBodurri
d0a1773175 feat(devtools): implement material expansion panel with drag functionality for each property tree 2020-03-22 19:59:30 -07:00
AleksanderBodurri
6d0c4093c2 feat(devtools): pass each datasource through to it's own material tree component 2020-03-22 19:59:30 -07:00
AleksanderBodurri
2d34a209a6 feat(devtools): create seperate property data sources for inputs/outputs/state 2020-03-22 19:59:30 -07:00
AleksanderBodurri
8ea84d5776 feat(devtools): implement input/output/state preview functionality with the reworked property explorer 2020-03-22 19:59:30 -07:00
AleksanderBodurri
39b65dd05a refactor(devtools): organize property explorer components 2020-03-22 19:59:30 -07:00
AleksanderBodurri
f8bb080157 feat(devtools): pass input/output data through from application to devtools UI 2020-03-22 19:59:30 -07:00
Sumit Arora
3d19ebf3a1 fix(devtools): added more padding to treegraph 2020-03-22 12:14:05 -04:00
mgechev
4b40752cb9 refactor(devtools): type safe serialization 2020-03-22 03:59:27 -04:00
mgechev
b127cdc211 fix(devtools): prevent race condition between getting nested props and refresh 2020-03-21 19:09:12 -07:00
mgechev
b010784b21 fix(devtools): do not expand HTML Comments and preserve state for selected nodes 2020-03-21 19:09:12 -07:00
mgechev
5f5307e610 fix(devtools): flicker properties when update selected node
Fix rangle/angular-devtools#171

The PR includes few changes:
1. Fixes a race condition between two competing async calls
2. Simplifies the message bus, now we have one method for getting the component tree instead of one for getting the component tree and another for getting properties. Similarly to GraphQL we send a query for exactly what we need.
3. Fixes the way we update properties in the UI once we receive new items
2020-03-21 19:09:12 -07:00
Sumit Arora
ee7d8e58c6 feat(devtools): making small frames clickable 2020-03-21 18:53:56 -07:00
mgechev
60cc2d8fc0 fix(devtools): proper typings in shell-chrome for strictNullChecks 2020-03-20 16:05:53 -07:00
Minko Gechev
6a6059d2b1 build(devtools): enable strictNullChecks (rangle/angular-devtools#167) 2020-03-20 11:54:37 -07:00
Sumit Arora
75cb030a84 feat(devtools): adding bar chart for timeline 2020-03-19 19:15:07 -07:00
mgechev
14e51e8875 test(devtools): verify that the app can select elements with the same name 2020-03-19 21:17:26 -04:00
mgechev
f4db6d7a44 test(devtools): add specs for the element property resolver 2020-03-19 21:17:26 -04:00
mgechev
b3b8c93656 test(devtools): fix typing errors in the specs 2020-03-19 21:17:26 -04:00
mgechev
f93b53bb89 fix(devtools): proper alignment of non-expandable props 2020-03-19 21:17:26 -04:00
mgechev
dce46e5411 refactor(devtools): move abstractions to separate files 2020-03-19 21:17:26 -04:00
mgechev
370a600481 refactor(devtools): use shared store between parent and child components 2020-03-19 21:17:26 -04:00
mgechev
2f115a2448 refactor(devtools): use DI for the messageBus instead of passing it as props 2020-03-19 21:17:26 -04:00
mgechev
25a6ecc438 refactor(devtools): reuse prop instances in the data source 2020-03-19 21:17:26 -04:00
mgechev
2a1f6e9464 fix(devtools): do not refresh the ui unless there are updates 2020-03-19 21:17:26 -04:00
Sumit Arora
0b991bdc0f feat(devtools): adding piechart for profiler 2020-03-18 15:41:56 -04:00
Sumit Arora
7990fdd7b3 style(devtools): adding control padding and bold title 2020-03-18 15:18:50 -04:00
Sumit Arora
257e231f68 style(devtools): fixing title style 2020-03-18 15:18:50 -04:00
Sumit Arora
7c93631b32 style(devtools): setting total time text to bold 2020-03-18 15:18:50 -04:00
AleksanderBodurri
e74e213b7c refactor(devtools): clean up record formatter constants by removing duplicate objects 2020-03-18 09:31:25 -04:00
AleksanderBodurri
a5beefb477 feat(devtools): rerender tree on resize to keep tree within view 2020-03-18 09:31:25 -04:00
AleksanderBodurri
ae478f0e29 test(devtools): create simple unit test for webtreegraph formatter 2020-03-18 09:31:25 -04:00
AleksanderBodurri
45de7613e4 refactor(devtools): create mock formatter to sepearte getLabel and getValue tests from flamegraph; 2020-03-18 09:31:25 -04:00
AleksanderBodurri
18214a9b99 feat(devtools): create webtree graph formatter and pass the formatted data through to the web tree graph visualizer 2020-03-18 09:31:25 -04:00
AleksanderBodurri
0140dc2c8b refactor(devtools): create formatter interface; move flamegraph formatting logic to class that implements interface 2020-03-18 09:31:25 -04:00
AleksanderBodurri
e86ffc1d86 test(devtools): write tests for record formatter 2020-03-18 09:31:25 -04:00
AleksanderBodurri
816974654c refactor(devtools): organize file structure of profiler components 2020-03-18 09:31:25 -04:00
AleksanderBodurri
e7db0d3f78 feat(devtools): split apart visualizing views; create new components for each visualizer component 2020-03-18 09:31:25 -04:00
mgechev
e74dc9e70d fix(devtools): make sure we dont access position of an undefined parent 2020-03-17 21:04:11 -04:00
mgechev
657c74151f fix(devtools): dont leak flat and indexed nodes 2020-03-16 23:04:19 -04:00
mgechev
48c140038b fix(devtools): refresh & reinitialize on navigation 2020-03-13 18:49:46 -07:00
AleksanderBodurri
059da5d908 feat(devtools): implement reload message bus event that calls window.location.reload inside of the dev tools 2020-03-12 15:54:47 -07:00
AleksanderBodurri
1871c34743 fix(devtools): get ng debug object whenever it is required through a function to prevent an issue where it would be set to undefined on page refresh 2020-03-12 15:54:47 -07:00
AleksanderBodurri
a4b748de75 fix(devtools): properly emit shutdown event on cleanup and call change detector ref to update ui into loading state 2020-03-12 15:54:47 -07:00
mgechev
07344cd4b3 feat(devtools): implement "force refresh" when the user presses the refresh button 2020-03-12 15:13:34 -07:00
mgechev
57f6f26b52 refactor(devtools): add comments and remove useless npm scripts 2020-03-12 15:13:15 -07:00
mgechev
3340caf648 fix(devtools): show report for replaced nodes in the same tile and get lifecycle hook name 2020-03-12 15:13:15 -07:00
mgechev
82a8d5c0aa fix(devtools): show elements nested in app elements 2020-03-12 15:13:15 -07:00
mgechev
387b2f34fd refactor(devtools): show more meaningful warning message to help us debug cases 2020-03-12 15:13:15 -07:00
mgechev
6d86bbc11b fix(devtools): get the lifecycle hook name using a more robust approach 2020-03-12 15:13:15 -07:00
mgechev
e254d385f1 refactor(devtools): extract root components traversing the dom 2020-03-12 15:13:15 -07:00
mgechev
fc5801b225 fix(devtools): get the lview from the instance context 2020-03-12 15:13:15 -07:00
AleksanderBodurri
5eed92e91c fix(devtools): give breadcrumb container a z-index higher than 1 to prevent an issue where scrolling on the x-axis may inadvertently scroll the properties view tab 2020-03-12 10:00:07 -07:00
AleksanderBodurri
0649cc485d fix(devtools): fix edge case where only one item is profiled and where no items are profiled 2020-03-11 15:39:45 -07:00
mgechev
5fe0d80d0c fix(devtools): compatibility issues with google3 2020-03-11 12:48:31 -07:00
mgechev
21f6b736f5 refactor(devtools): rename getComponentName to getDirectiveName 2020-03-11 12:48:31 -07:00
mgechev
30978b3718 fix(devtools): names of the tiles in the profiler graph 2020-03-11 12:48:31 -07:00
mgechev
becdcca64a feat(devtools): add support for Angular elements
Currently, we only show which components are Angular elements. We don't visualize them in their position in the component tree, but only indicate with different coloring.

In the profiler we should also somehow show which tiles correspond to elements. We can discuss this further in rangle/angular-devtools#112.
2020-03-11 09:53:34 -04:00
AleksanderBodurri
ef16144443 test(devtools): integration tests for node selection logic after change detection 2020-03-10 14:54:24 -07:00
AleksanderBodurri
34d2f4057a test(devtools): write unit tests for arrayEquals function 2020-03-10 14:54:24 -07:00
AleksanderBodurri
9bdaa57a74 feat(devtools): create shared-utils project library to house functions and classes that can be used by any other project 2020-03-10 14:54:24 -07:00
AleksanderBodurri
2eaf29822f refactor(devtools): use arrayEquals instead of converting to string and checking equality in expandParents method 2020-03-10 14:54:24 -07:00
AleksanderBodurri
0f4dd494f3 fix(devtools): reselect node if it changes position after change detection 2020-03-10 14:54:24 -07:00
mgechev
7851fb2348 perf(devtools): do not index on mutation of inspector 2020-03-10 15:56:38 -04:00
AleksanderBodurri
5b10bf2e38 refactor(devtools): add tslint typing rule and fix tslint warnings 2020-03-10 09:50:00 -07:00
mgechev
50488f9380 fix(devtools): distinguish between items with and without children
The big was caused by the diffing logic. We weren't updating the `router-outlet` because we were getting the same instance. Although that is true, there's a special case when the same instance now has children, which should cause rerender of the item (it's not expandable).
2020-03-09 15:32:39 -04:00
mgechev
ce3fbd0426 refactor(devtools): remove obsolete test and fix existing e2e tests 2020-03-09 14:59:09 -04:00
mgechev
bcfd7b97d6 fix(devtools): align with latest changes and keep consistent frame tree 2020-03-09 14:59:09 -04:00
mgechev
d6a0afc1d6 refactor(devtools): dont recompute directive forest frequently 2020-03-09 14:59:09 -04:00
mgechev
085232972e refactor(devtools): use different algorithm for observing the tree to align with the internal traversal 2020-03-09 14:59:09 -04:00
mgechev
c2dfa86702 refactor(devtools): use internal ivy data structures for extracting component tree 2020-03-09 14:59:09 -04:00
AleksanderBodurri
87aaa4933c fix(devtools): check if node.children is undefined before trying to convert it into an array (ex. node is a text node) 2020-03-05 09:54:18 -08:00
AleksanderBodurri
a30d2a5653 fix(devtools): index new nodes before firing callbacks to fix issue where some callbacks rely on the newly indexed nodes 2020-03-05 09:53:45 -08:00
AleksanderBodurri
0babf20443 refactor(devtools): Use material dialog instead of browser confirm when profiler version is incorrect 2020-03-04 10:21:48 -08:00
AleksanderBodurri
dceb8d304c feat(devtools): add versioning to import/export functionality 2020-03-04 10:21:48 -08:00
AleksanderBodurri
605214c59d feat(devtools): implement import/export json functionality for profiler 2020-03-04 10:21:48 -08:00
AleksanderBodurri
9c4c18b8ef fix(devtools): fix bug in component tree observer that prevented nested added nodes from having their ids set properly 2020-03-04 10:21:02 -08:00
AleksanderBodurri
466ecaf472 refactor(devtools): rename invalidArrowEvent method for damp-ness 2020-03-02 11:11:24 -10:00
AleksanderBodurri
a665e305ea fix(devtools): allow arrow key events to fire when focusing on an input 2020-03-02 11:11:24 -10:00
AleksanderBodurri
b1d0f0a7d4 feat(devtools): add overflow-x auto to breadcrumbs tab 2020-03-02 09:07:49 -10:00
AleksanderBodurri
d1d31e2a8f refactor(devtools): remove unused enums 2020-03-02 09:07:29 -10:00
AleksanderBodurri
97915ba9fb refactor(devtools): type returns of insertion trie methods 2020-03-01 09:53:37 -10:00
AleksanderBodurri
015d98e2c0 feat(devtools): decrease width of split pane to match the rest of the application 2020-02-28 10:00:53 -05:00
AleksanderBodurri
38afb5c90b feat(devtools): Add margin to tree nodes so that they are not stacked on each other directly 2020-02-28 10:00:53 -05:00
AleksanderBodurri
eb3a1c2971 fix(devtools): fix issue where last node would be hidden behind breadcrumbs 2020-02-28 10:00:53 -05:00
AleksanderBodurri
6c284ef32e fix(devtools tabs): stop scroll occuring at tabs level 2020-02-28 10:00:53 -05:00
AleksanderBodurri
4ea0d91dc5 feat(devtools): reorient split pane when screen width goes under 500 px 2020-02-28 10:00:53 -05:00
Sumit Arora
d052ced086 test(devtools): adding highlighter tests 2020-02-27 14:33:48 -05:00
Sumit Arora
9205c1f7ae test(devtools): adding text-summary for code coverage 2020-02-27 14:33:48 -05:00
AleksanderBodurri
8d713657e7 test(devtools): add e2e testing for property editing feature 2020-02-26 15:35:50 -10:00
AleksanderBodurri
1fc39d9332 fix(devtools): fix issue that prevented booleans from being parsed properly 2020-02-26 15:35:50 -10:00
AleksanderBodurri
6727d7e229 fix(devtools): set a min width for the property view split tab to prevents styling issues when tab is too small 2020-02-26 15:35:50 -10:00
AleksanderBodurri
9510a1c38e fix(devtools): make edit functionality compatible with new getDirectiveForest api 2020-02-26 15:35:50 -10:00
AleksanderBodurri
29db8d5a8b feat(devtools): allow user to edit props 2020-02-26 15:35:50 -10:00
AleksanderBodurri
2025717a13 fix(devtools): check if node.nativeelement is an instance of an HTMLElement before calling ng.getComponent on it (rangle/angular-devtools#93) 2020-02-26 10:17:27 -05:00
AleksanderBodurri
3b8833cfec fix(devtools): use cascading view child/children to fix regression caused by refactor (rangle/angular-devtools#92) 2020-02-25 14:39:00 -05:00
AleksanderBodurri
edcaa8c89f fix(devtools): stop filter input from scrolling with the component forest (rangle/angular-devtools#87) 2020-02-25 10:45:31 -05:00
AleksanderBodurri
5eba00abe5 fix(devtools): fix regression that broke node expansion (rangle/angular-devtools#88) 2020-02-25 10:36:02 -05:00
AleksanderBodurri
dd977f4b26 fix(devtools): fix regression that broke assignment of selected node to $ng0 variable (rangle/angular-devtools#89) 2020-02-25 10:32:04 -05:00
AleksanderBodurri
c5e633b8a3 refactor(devtools): refactor breadcrumbs into its own component. (rangle/angular-devtools#90) 2020-02-25 10:27:09 -05:00
AleksanderBodurri
984dfc6db1 fix(devtools): fix typo in file names (rangle/angular-devtools#91) 2020-02-25 07:44:22 -05:00
Sumit Arora
6ddac7c051 feat(devtools): Applying consistent styling 2020-02-24 17:23:37 -05:00
mgechev
113e4cc72d refactor(devtools): address review comments 2020-02-24 11:09:10 -05:00
mgechev
c3a8fcb08a refactor(devtools): address review comments 2020-02-24 11:09:10 -05:00
mgechev
41cb658e10 fix(devtools): handle corner cases when a component aims to replace an existing one 2020-02-24 11:09:10 -05:00
mgechev
6154f8dfdf fix(devtools): proper tracking without overwriting previous refs 2020-02-24 11:09:10 -05:00
mgechev
b46b296255 fix(devtools): get proper change detection trigger 2020-02-24 11:09:10 -05:00
mgechev
b350bfc838 fix(devtools): remove jumping when adding nodes 2020-02-24 11:09:10 -05:00
mgechev
632a12579b fix(devtools): prevent node overwriting 2020-02-24 11:09:10 -05:00
mgechev
4b2c509b61 test(devtools): disable two specs temporarily 2020-02-24 11:09:10 -05:00
mgechev
570adcf2f5 fix(devtools): proper calculation of the lifecycle hook duration 2020-02-24 11:09:10 -05:00
mgechev
dba943a4e2 feat(devtools): detect directives added to non-elements 2020-02-24 11:09:10 -05:00
mgechev
8a286f1a07 fix(devtools): show proper lifecycle hook names 2020-02-24 11:09:10 -05:00
mgechev
23bc10cf7e fix(devtools): do not highlight nodes during initial rendering 2020-02-24 11:09:10 -05:00
mgechev
c44f00b78e feat(devtools): patch life cycle hooks 2020-02-24 11:09:10 -05:00
mgechev
a8088ac68f fix(devtools): proper timing for operations 2020-02-24 11:09:10 -05:00
mgechev
268ac30463 refactor(devtools): remove unused components 2020-02-24 11:09:10 -05:00
mgechev
f454498274 fix(devtools): make sure we dont fail on null elements 2020-02-24 11:09:10 -05:00
mgechev
dca328e2ee refactor(devtools): remove time travel and aggregated timeline 2020-02-24 11:09:10 -05:00
mgechev
aba32e3efc refactor(devtools): remove debugging left overs 2020-02-24 11:09:10 -05:00
mgechev
88a608640d test(devtools): fix broken time-travel tests 2020-02-24 11:09:10 -05:00
mgechev
a00c19f101 feat(devtools): introduce directive records 2020-02-24 11:09:10 -05:00
mgechev
b3043bd61d refactor(devtools): type safe profiler records 2020-02-24 11:09:10 -05:00
mgechev
79f145dc77 fix(devtools): proper diffing with unique ids 2020-02-24 11:09:10 -05:00
mgechev
451ff03d91 refactor(devtools): move the component tree identification to a better named file 2020-02-24 11:09:10 -05:00
mgechev
9d7b762d7d refactor(devtools): remove cyclic dependency 2020-02-24 11:09:10 -05:00
mgechev
17eea0549b fix(devtools): show new items using a class 2020-02-24 11:09:10 -05:00
mgechev
5d0d064b17 refactor(devtools): identity tracker 2020-02-24 11:09:10 -05:00
mgechev
b7b99b8532 feat(devtools): implement proper diffing in the explorer 2020-02-24 11:09:10 -05:00
mgechev
758d0a82fe feat(devtools): keep unique index for all components and directives 2020-02-24 11:09:10 -05:00
mgechev
a5ab7ba5e7 refactor(devtools): rename id to position 2020-02-24 11:09:10 -05:00
mgechev
36fd1f89da refactor(devtools): use proper terminology for the observer 2020-02-24 11:09:10 -05:00
mgechev
ff0e41496e test(devtools): verify we can add top nodes 2020-02-24 11:09:10 -05:00
mgechev
03f896c48e refactor(devtools): move identity tracking to separate abstraction 2020-02-24 11:09:10 -05:00
mgechev
4d8ca6565a refactor(devtools): dont create objects when dont have to 2020-02-24 11:09:10 -05:00
mgechev
86cb107fee feat(devtools): use flamegraph in timeline and aggregated view 2020-02-24 11:09:10 -05:00
mgechev
b2a537a41b fix(devtools): proper diffing and expansion of new items 2020-02-24 11:09:10 -05:00
AleksanderBodurri
a4a06eea18 perf(devtools): stream records incrementally so that they do not get sent all at once 2020-02-19 12:46:09 -08:00
AleksanderBodurri
ec1c95cbdb refactor(devtools): separate object creation concern from state serializer api (rangle/angular-devtools#69) 2020-02-19 13:28:41 -05:00
Sumit Arora
f06aedc28c feat(devtools): adding icon popups displaying app status (rangle/angular-devtools#70) 2020-02-19 12:55:16 -05:00
AleksanderBodurri
78b3d39810 feat(devtools): implement split pane so that user can resize properties view tab (rangle/angular-devtools#60) 2020-02-19 10:51:44 -05:00
mgechev
212e4026f8 fix(devtools): nowrap for the material tree items 2020-02-18 11:49:51 -08:00
mgechev
5fa1c35579 fix(devtools): set proper types of the props in the clipboard copy feature 2020-02-18 11:49:51 -08:00
AleksanderBodurri
d95806ef57 perf(devtools): cache timeline frames so that the timetraveler doesn't have to process the same frame multiple times 2020-02-18 11:48:58 -08:00
mgechev
337be9bd63 feat(devtools): use flamechart with a better layout 2020-02-18 10:47:27 -08:00