shopify-theme-devtools 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -13,7 +13,7 @@ A powerful in-browser developer tools panel for Shopify theme development. Inspe
13
13
  - **Objects Inspector** — Browse `shop`, `product`, `collection`, `customer`, `cart` and more with deep search and collapsible tree view
14
14
  - **Metafields Viewer** — Explore metafields across all resources and namespaces with type labels
15
15
  - **Cart Panel** — Real-time cart state with add/remove/quantity controls, cart history with restore, and attribute editing
16
- - **Console** — Chrome DevTools-style console with Liquid expression evaluator, autocomplete, and log filtering
16
+ - **Console** — Chrome DevTools-style console with Liquid expression evaluator, and autocomplete
17
17
  - **Localization** — Markets, currencies, languages, and country data with quick switcher
18
18
  - **SEO Inspector** — Meta tags, Open Graph, Twitter Cards, and structured data (JSON-LD) validation
19
19
  - **Analytics Viewer** — Detects Google Analytics, Facebook Pixel, and other tracking codes
@@ -29,10 +29,21 @@ Browse and search through all Liquid objects with a collapsible tree view. Click
29
29
 
30
30
  ### Console Panel
31
31
 
32
- Evaluate Liquid expressions in real-time with autocomplete, filter support, and command history.
32
+ A powerful Liquid debugger combining error detection and expression evaluation.
33
33
 
34
34
  ![Console Panel](screenshots/console-panel.gif)
35
35
 
36
+ **Liquid Error Detection:**
37
+ - **Liquid Errors** — Detects `Liquid error:` and `Liquid syntax error:` messages in page content
38
+ - **Drop Object Leaks** — Finds raw Drop objects rendered on page (`ProductDrop`, `#<ProductDrop:0x...>`)
39
+ - **Asset Errors** — Missing snippets, images, and asset files
40
+ - **Schema Errors** — Invalid JSON in section schemas
41
+ - **JSON Filter Errors** — Detects `{"error":"..."}` output from failed `| json` filters
42
+ - **Form Errors** — Missing product/customer objects for forms
43
+ - **Smart Hints** — Context-aware fix suggestions for each error type
44
+
45
+ **Expression Evaluator:**
46
+
36
47
  ### Cart Snapshots
37
48
 
38
49
  Track cart state changes over time and restore any previous snapshot with a single click.
@@ -82,12 +93,28 @@ Automatically scans the page for common Liquid issues:
82
93
  - Schema validation errors
83
94
  - Deprecation warnings
84
95
 
85
- ### Network Monitor
96
+ ### Network Panel
97
+
98
+ Captures and inspects Shopify API requests with powerful debugging tools:
99
+
100
+ - **Request Logging** — Auto-captures cart, product, collection, search, and GraphQL requests
101
+ - **Request Editor** — Edit and resend requests with modified method, URL, headers, and body
102
+ - **Replay** — Re-execute any captured request with one click
103
+ - **Cart State Diff** — See exactly what changed in the cart after mutations (items added/removed/changed)
104
+ - **Copy as cURL/Fetch** — Export requests for debugging or sharing
105
+ - **Persistence** — Last 32 requests are saved to localStorage and restored on reload
106
+ - **GraphQL Prettifier** — Syntax-highlighted, formatted GraphQL queries
107
+ - **Error Diagnosis** — Smart suggestions for common cart and API errors (out of stock, invalid variants, quantity limits)
108
+
109
+ ### Tab Customization
110
+
111
+ Customize your devtools layout like Chrome DevTools:
86
112
 
87
- Captures failed HTTP requests with:
88
- - Status codes and response times
89
- - Request URLs with query parameters
90
- - Error categorization (4xx, 5xx, CORS, timeout)
113
+ - **Right-click any tab** to show/hide it
114
+ - **Drag tabs** to reorder them
115
+ - **Preferences tab** cannot be hidden (ensures you can always restore tabs)
116
+ - **"Reset to Defaults"** restores original tab order and visibility
117
+ - Hidden tabs are completely unloaded from DOM (saves memory/CPU)
91
118
 
92
119
  ## Quick Start
93
120
 
@@ -98,11 +125,11 @@ Copy the Liquid bridge to your theme's snippets folder:
98
125
  ```bash
99
126
  # Option A: Download directly
100
127
  curl -o snippets/theme-devtools-bridge.liquid \
101
- https://raw.githubusercontent.com/user/shopify-theme-devtools/main/src/liquid/theme-devtools-bridge.liquid
128
+ https://raw.githubusercontent.com/yakohere/shopify-theme-devtools/main/src/liquid/theme-devtools-bridge.liquid
102
129
 
103
- # Option B: Install via npm
104
- npm install shopify-theme-devtools
105
- cp node_modules/shopify-theme-devtools/src/liquid/theme-devtools-bridge.liquid snippets/
130
+ # Option B: Copy manually from GitHub
131
+ # Visit: https://github.com/yakohere/shopify-theme-devtools/blob/main/src/liquid/theme-devtools-bridge.liquid
132
+ # Click "Raw" and save the file to your theme's snippets/ folder
106
133
  ```
107
134
 
108
135
  ### 2. Include in your layout
@@ -126,6 +153,8 @@ The devtools panel automatically appears on **unpublished/development themes onl
126
153
  | Evaluate Expression | `Enter` in Console input |
127
154
  | Autocomplete | `Tab` in Console input |
128
155
  | Command History | `↑` / `↓` in Console input |
156
+ | Show/Hide Tabs | Right-click any tab |
157
+ | Reorder Tabs | Drag and drop tabs |
129
158
 
130
159
  ## Panel Reference
131
160
 
@@ -138,6 +167,7 @@ The devtools panel automatically appears on **unpublished/development themes onl
138
167
  | **Analytics** | Detected tracking codes and analytics configuration |
139
168
  | **SEO** | Meta tags, Open Graph, Twitter Cards, JSON-LD structured data |
140
169
  | **Apps** | Installed Shopify apps detected on the page |
170
+ | **Network** | API request monitor with edit/replay, cart diffs, and error diagnosis |
141
171
  | **Console** | Logs, errors, and Liquid expression evaluator |
142
172
  | **Cookies** | Browser cookies with expiration and flags |
143
173
  | **Storage** | localStorage and sessionStorage key-value pairs |
@@ -212,7 +242,7 @@ src/
212
242
  │ └── theme-devtools-bridge.liquid # Liquid snippet for themes
213
243
  ├── scripts/
214
244
  │ ├── components/
215
- │ │ ├── theme-devtools.js # Main component
245
+ │ │ ├── theme-devtools.js # Main component with tab management
216
246
  │ │ ├── object-inspector.js # Tree view inspector
217
247
  │ │ └── panels/ # Panel components
218
248
  │ ├── services/
@@ -220,6 +250,7 @@ src/
220
250
  │ │ ├── product.js # Product API (variants/images)
221
251
  │ │ ├── context.js # Liquid context parser
222
252
  │ │ ├── expression-evaluator.js # Liquid expression engine
253
+ │ │ ├── network-interceptor.js # Fetch/XHR interceptor with persistence
223
254
  │ │ └── settings.js # User preferences
224
255
  │ └── styles/
225
256
  │ └── theme.js # CSS variables and themes