Skip to content
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Update Node baseline to a still-supported LTS

.nvmrc now pins Node 18, which reached end-of-life on April 30 2025 and no longer receives security fixes. Please move to an actively supported LTS (e.g., Node 20) before merging so local builds don’t rely on an unpatched runtime.

Apply this diff to bump the pinned version:

-18
+20
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
18
20
🤖 Prompt for AI Agents
In .nvmrc around lines 1 to 1 the file pins Node to 18 (which is EOL); update
the pinned Node version to a currently supported LTS such as 20 by replacing the
existing version string with "20" (or "v20" depending on your repo convention)
so local developers and CI use an actively supported runtime; commit the change
and run a quick local build/test to verify compatibility.

2 changes: 1 addition & 1 deletion assets/build/block.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '5c13835270f8b2070a23');
<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '748e985bc8616f514a4a');
4,006 changes: 4,005 additions & 1 deletion assets/build/block.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/build/block.js.map

Large diffs are not rendered by default.

96 changes: 96 additions & 0 deletions assets/build/blocks/QuickSearch/block.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "wedocs/quick-search",
"version": "1.0.0",
"title": "weDocs - Quick Search",
"icon": "search",
"category": "widgets",
"description": "Add a quick search block that opens a modal with documentation search",
"supports": {
"html": false
},
"render": "file:./render.php",
"attributes": {
"searchBoxPlaceholder": {
"type": "string",
"default": "Quick search..."
},
"modalPlaceholder": {
"type": "string",
"default": "Search documentation"
},
"modalDocsSource": {
"type": "string",
"default": "helpful"
},
"sectionIds": {
"type": "string",
"default": ""
},
"articleIds": {
"type": "string",
"default": ""
},
"helpfulDocsCount": {
"type": "number",
"default": 10
},
Comment on lines +35 to +38
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Schema missing attributes used elsewhere (breaks featured/icon/none and styling).

Add:

  • resultImageType (string)
  • modalStyles.listItemBackgroundColor
  • modalStyles.listItemIconBackgroundColor
  • modalStyles.articleLabelColor
     "helpfulDocsCount": {
       "type": "number",
       "default": 10
     },
+    "resultImageType": {
+      "type": "string",
+      "default": "icon"
+    },
@@
     "modalStyles": {
       "type": "object",
       "default": {
         "placeholderColor": "#9CA3AF",
         "searchIconColor": "#6B7280",
         "backgroundColor": "#FFFFFF",
         "fieldTextColor": "#111827",
         "listItemIconColor": "#3B82F6",
         "listItemTextColor": "#111827",
         "docLabelColor": "#3B82F6",
         "sectionLabelColor": "#3B82F6",
+        "articleLabelColor": "#8B5CF6",
         "listItemPadding": {
           "top": "12px",
           "right": "16px",
           "bottom": "12px",
           "left": "16px"
         },
         "listItemMargin": {
           "top": "0px",
           "right": "0px",
           "bottom": "0px",
           "left": "0px"
         },
         "listItemBorderColor": "#E5E7EB",
         "listItemBorderWidth": "1px",
-        "listItemBorderRadius": "4px"
+        "listItemBorderRadius": "4px",
+        "listItemBackgroundColor": "#F9FAFB",
+        "listItemIconBackgroundColor": "transparent"
       }
     }

Also applies to: 67-95

🤖 Prompt for AI Agents
In assets/build/blocks/QuickSearch/block.json around lines 35-38 (and similarly
for the schema block at lines 67-95), the JSON schema is missing attributes that
other code expects — add a string property "resultImageType" and under
"modalStyles" add "listItemBackgroundColor", "listItemIconBackgroundColor", and
"articleLabelColor" (all strings, with sensible defaults matching existing theme
tokens) so featured/icon/none rendering and styling work; update both schema
sections to include these properties and default values consistent with the rest
of the block schema.

"searchBoxStyles": {
"type": "object",
"default": {
"placeholderColor": "#9CA3AF",
"iconColor": "#6B7280",
"commandKeyColor": "#6B7280",
"backgroundColor": "#FFFFFF",
"borderColor": "#D1D5DB",
"borderWidth": "1px",
"borderRadius": "8px",
"padding": {
"top": "12px",
"right": "16px",
"bottom": "12px",
"left": "16px"
},
"margin": {
"top": "0px",
"right": "0px",
"bottom": "0px",
"left": "0px"
},
"fontSize": "16px",
"fontWeight": "400",
"letterSpacing": "0px",
"lineHeight": "1.5"
}
},
"modalStyles": {
"type": "object",
"default": {
"placeholderColor": "#9CA3AF",
"searchIconColor": "#6B7280",
"backgroundColor": "#FFFFFF",
"fieldTextColor": "#111827",
"listItemIconColor": "#3B82F6",
"listItemTextColor": "#111827",
"docLabelColor": "#3B82F6",
"sectionLabelColor": "#3B82F6",
"listItemPadding": {
"top": "12px",
"right": "16px",
"bottom": "12px",
"left": "16px"
},
"listItemMargin": {
"top": "0px",
"right": "0px",
"bottom": "0px",
"left": "0px"
},
"listItemBorderColor": "#E5E7EB",
"listItemBorderWidth": "1px",
"listItemBorderRadius": "4px"
}
}
}
}
Loading