File tree Expand file tree Collapse file tree
src/pages/devtools/components/detail/primitives/PropertyRow Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ Open to adding support for other Analytics services.
6767
6868### Chrome Web Store
6969
70- 1 . Visit the [ Chrome Web Store listing] ( https://chromewebstore.google.com/detail/nabnhcbhcecfohhaodnpoipanaaapkpi )
70+ 1 . Visit the [ Chrome Web Store listing] ( https://chromewebstore.google.com/detail/analytics-x-ray/ nabnhcbhcecfohhaodnpoipanaaapkpi )
71712 . Click ** "Add to Chrome"**
72723 . Confirm the installation
73734 . Open Chrome DevTools (F12 or Cmd+Option+I) and look for the "Analytics X-Ray" tab
Original file line number Diff line number Diff line change 11{
22 "name" : " analytics-x-ray" ,
3- "version" : " 0.1.1 " ,
3+ "version" : " 0.1.2 " ,
44 "description" : " Analytics X-Ray is a tool that helps you analyze your analytics data." ,
55 "license" : " MIT" ,
66 "repository" : {
Original file line number Diff line number Diff line change @@ -33,11 +33,25 @@ export const PropertyRow = React.memo(
3333 onTogglePin,
3434 showPinButton = false ,
3535 } : Readonly < PropertyRowProps > ) {
36- const [ state , setState ] = useState < PropertyRowState > ( {
37- isExpanded : false ,
38- copied : false ,
39- useJsonView : false ,
40- visibleChunks : new Set ( [ 0 ] ) , // First chunk visible by default
36+ const [ state , setState ] = useState < PropertyRowState > ( ( ) => {
37+ // Only expand top-level properties (depth === 0) by default
38+ if ( depth !== 0 || ! isExpandable ( value ) ) {
39+ return {
40+ isExpanded : false ,
41+ copied : false ,
42+ useJsonView : false ,
43+ visibleChunks : new Set ( [ 0 ] ) ,
44+ } ;
45+ }
46+ // For arrays, only expand if length < 50
47+ // For objects, always expand (no length check)
48+ const shouldExpand = Array . isArray ( value ) ? value . length < 50 : true ;
49+ return {
50+ isExpanded : shouldExpand ,
51+ copied : false ,
52+ useJsonView : false ,
53+ visibleChunks : new Set ( [ 0 ] ) , // First chunk visible by default
54+ } ;
4155 } ) ;
4256
4357 // Helper for partial updates
You can’t perform that action at this time.
0 commit comments