-
Notifications
You must be signed in to change notification settings - Fork 153
Feature/subscription gutenberg block #1838
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
Changes from 9 commits
26c7e36
3c78092
f1332c0
e711d92
3aa724b
c7ee0f1
9eb1c3e
12c8e5b
74d2b66
8f8ab0d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,8 @@ export.sh | |
| .vscode | ||
| .github/prompts | ||
| .cursor | ||
| .superpowers | ||
| docs/superpowers | ||
| /.DS_Store | ||
| /bin | ||
| nbproject | ||
|
|
||
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,108 @@ | ||
| { | ||
| "$schema": "https://schemas.wp.org/trunk/block.json", | ||
| "apiVersion": 3, | ||
| "name": "wpuf/subscription-packs", | ||
| "version": "1.0.0", | ||
| "title": "Subscription Packs", | ||
| "category": "wpuf", | ||
| "description": "Display WPUF subscription packs with customizable layout and styling.", | ||
| "textdomain": "wp-user-frontend", | ||
| "icon": "cart", | ||
| "keywords": [ | ||
| "subscription", | ||
| "pricing", | ||
| "plans", | ||
| "wpuf" | ||
| ], | ||
| "attributes": { | ||
| "include": { | ||
| "type": "array", | ||
| "default": [] | ||
| }, | ||
| "exclude": { | ||
| "type": "array", | ||
| "default": [] | ||
| }, | ||
| "columns": { | ||
| "type": "number", | ||
| "default": 3 | ||
| }, | ||
| "order": { | ||
| "type": "string", | ||
| "default": "" | ||
| }, | ||
| "orderby": { | ||
| "type": "string", | ||
| "default": "" | ||
| }, | ||
| "showPrice": { | ||
| "type": "boolean", | ||
| "default": true | ||
| }, | ||
| "showFeatures": { | ||
| "type": "boolean", | ||
| "default": true | ||
| }, | ||
| "showDescription": { | ||
| "type": "boolean", | ||
| "default": true | ||
| }, | ||
| "buttonColor": { | ||
| "type": "string", | ||
| "default": "" | ||
| }, | ||
| "buttonText": { | ||
| "type": "string", | ||
| "default": "" | ||
| }, | ||
| "packBackgroundColor": { | ||
| "type": "string", | ||
| "default": "#ffffff" | ||
| }, | ||
| "packBorderColor": { | ||
| "type": "string", | ||
| "default": "#e5e7eb" | ||
| }, | ||
| "packBorderRadius": { | ||
| "type": "number", | ||
| "default": 12 | ||
| }, | ||
| "packPadding": { | ||
| "type": "number", | ||
| "default": 24 | ||
| }, | ||
| "packShadow": { | ||
| "type": "string", | ||
| "default": "md" | ||
| }, | ||
| "titleFontSize": { | ||
| "type": "number", | ||
| "default": 18 | ||
| }, | ||
| "priceFontSize": { | ||
| "type": "number", | ||
| "default": 30 | ||
| }, | ||
| "cardGap": { | ||
| "type": "number", | ||
| "default": 16 | ||
| }, | ||
| "recurringFontSize": { | ||
| "type": "number", | ||
| "default": 14 | ||
| } | ||
| }, | ||
| "supports": { | ||
| "spacing": { | ||
| "margin": true, | ||
| "padding": true | ||
| }, | ||
| "align": [ | ||
| "wide", | ||
| "full" | ||
| ], | ||
| "html": false | ||
| }, | ||
| "editorScript": "wpuf-subscription-packs-editor", | ||
| "editorStyle": "wpuf-subscription-packs-editor-style" | ||
| } | ||
|
Comment on lines
+1
to
+108
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Check for duplicate block.json files and verify which one is used
echo "=== All block.json files for subscription-packs ==="
fd -t f 'block.json' | xargs grep -l 'wpuf/subscription-packs' 2>/dev/null
echo ""
echo "=== Checking if assets/js/js/ path is intentional ==="
# Look for webpack config or build scripts that might output to this path
rg -l 'assets/js/js' --type=js --type=json -g '!**/node_modules/**' 2>/dev/null || echo "No references found"
echo ""
echo "=== Check .gitignore for assets/js/ patterns ==="
cat .gitignore 2>/dev/null | grep -E '(assets/js|build)' || echo "No matching patterns"Repository: weDevsOfficial/wp-user-frontend Length of output: 351 🏁 Script executed: #!/bin/bash
# Check if the two files have identical content
echo "=== Comparing block.json files ==="
if diff -q assets/js/js/blocks/subscription-packs/block.json src/js/blocks/subscription-packs/block.json; then
echo "Files are identical"
else
echo "Files differ"
diff assets/js/js/blocks/subscription-packs/block.json src/js/blocks/subscription-packs/block.json | head -20
fi
echo ""
echo "=== Checking SubscriptionPacks.php line 88 ==="
sed -n '85,91p' includes/Blocks/SubscriptionPacks.php
echo ""
echo "=== Checking if assets/js/js/ is in git ==="
git ls-files | grep -c '^assets/js/js/' && echo "Yes, tracked in git" || echo "Not tracked in git"Repository: weDevsOfficial/wp-user-frontend Length of output: 1118 🏁 Script executed: #!/bin/bash
# Get the full diff to see the actual differences
echo "=== Full comparison of differences ==="
diff -u src/js/blocks/subscription-packs/block.json assets/js/js/blocks/subscription-packs/block.json
echo ""
echo "=== Line counts ==="
echo "src/js/blocks/subscription-packs/block.json: $(wc -l < src/js/blocks/subscription-packs/block.json) lines"
echo "assets/js/js/blocks/subscription-packs/block.json: $(wc -l < assets/js/js/blocks/subscription-packs/block.json) lines"
echo ""
echo "=== Check for webpack/build config that might output to assets/js/ ==="
fd -t f 'webpack\|gulpfile\|rollup\|build' | head -20
echo ""
echo "=== Check git history of the assets file ==="
git log --oneline -n 5 -- assets/js/js/blocks/subscription-packs/block.json 2>/dev/null || echo "No history available"Repository: weDevsOfficial/wp-user-frontend Length of output: 5434 Remove or clarify the orphaned This file is tracked in git but not used by the block registration. The 🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,164 @@ | ||
| /* DESCRIPTION: Editor-only styles for the subscription packs block. */ | ||
| /* Includes MultiSelect component styles and ServerSideRender adjustments. */ | ||
|
|
||
| .wp-block-wpuf-subscription-packs .components-server-side-render { | ||
| pointer-events: none; | ||
| } | ||
|
|
||
| .wp-block-wpuf-subscription-packs .components-placeholder { | ||
| min-height: 100px; | ||
| } | ||
|
|
||
| /* Loading overlay for ServerSideRender */ | ||
| .wpuf-ssr-loading-overlay { | ||
| position: absolute; | ||
| inset: 0; | ||
| z-index: 1; | ||
| display: flex; | ||
| flex-direction: column; | ||
| align-items: center; | ||
| justify-content: center; | ||
| background: rgba(255, 255, 255, 0.75); | ||
| min-height: 80px; | ||
| } | ||
|
|
||
| .wpuf-ssr-loading { | ||
| width: 32px; | ||
| height: 32px; | ||
| border: 3px solid #e0e0e0; | ||
| border-top-color: #007cba; | ||
| border-radius: 50%; | ||
| animation: wpuf-ssr-spin 0.7s linear infinite; | ||
| } | ||
|
|
||
| @keyframes wpuf-ssr-spin { | ||
| to { transform: rotate(-360deg); } | ||
| } | ||
|
|
||
| /* MultiSelect component */ | ||
| .wpuf-block-multiselect { | ||
| position: relative; | ||
| } | ||
|
|
||
| .wpuf-block-multiselect__trigger { | ||
| display: flex; | ||
| width: 100%; | ||
| align-items: center; | ||
| justify-content: space-between; | ||
| height: 40px; | ||
| padding: 8px 12px; | ||
| background: #fff; | ||
| border: 1px solid #949494; | ||
| border-radius: 4px; | ||
| font-size: 13px; | ||
| color: #1e1e1e; | ||
| cursor: pointer; | ||
| text-align: right; | ||
| } | ||
|
|
||
| .wpuf-block-multiselect__trigger:hover { | ||
| border-color: #007cba; | ||
| } | ||
|
|
||
| .wpuf-block-multiselect__placeholder { | ||
| color: #757575; | ||
| } | ||
|
|
||
| .wpuf-block-multiselect__dropdown { | ||
| position: absolute; | ||
| z-index: 10; | ||
| margin-top: 4px; | ||
| width: 100%; | ||
| max-height: 240px; | ||
| overflow-y: auto; | ||
| background: #fff; | ||
| border: 1px solid #ddd; | ||
| border-radius: 4px; | ||
| box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12); | ||
| list-style: none; | ||
| padding: 0; | ||
| margin-right: 0; | ||
| } | ||
|
|
||
| .wpuf-block-multiselect__search-wrap { | ||
| position: sticky; | ||
| top: 0; | ||
| background: #fff; | ||
| padding: 8px; | ||
| border-bottom: 1px solid #eee; | ||
| margin-bottom: 0; | ||
| } | ||
|
|
||
| .wpuf-block-multiselect__search { | ||
| width: 100%; | ||
| padding: 6px 10px; | ||
| border: 1px solid #ddd; | ||
| border-radius: 3px; | ||
| font-size: 13px; | ||
| } | ||
|
|
||
| .wpuf-block-multiselect__search:focus { | ||
| outline: none; | ||
| border-color: #007cba; | ||
| box-shadow: 0 0 0 1px #007cba; | ||
| } | ||
|
|
||
| .wpuf-block-multiselect__option { | ||
| padding: 8px 12px; | ||
| cursor: pointer; | ||
| font-size: 13px; | ||
| margin-bottom: 0; | ||
| } | ||
|
|
||
| .wpuf-block-multiselect__option:hover { | ||
| background: #f0f0f0; | ||
| } | ||
|
|
||
| .wpuf-block-multiselect__empty { | ||
| padding: 12px; | ||
| color: #757575; | ||
| font-size: 13px; | ||
| margin-bottom: 0; | ||
| } | ||
|
|
||
| .wpuf-block-multiselect__pills { | ||
| display: flex; | ||
| flex-wrap: wrap; | ||
| gap: 6px; | ||
| margin-top: 8px; | ||
| } | ||
|
|
||
| .wpuf-block-multiselect__pill { | ||
| display: inline-flex; | ||
| align-items: center; | ||
| gap: 4px; | ||
| padding: 2px 8px; | ||
| background: #f0f0f0; | ||
| border: 1px solid #ddd; | ||
| border-radius: 12px; | ||
| font-size: 12px; | ||
| color: #1e1e1e; | ||
| } | ||
|
|
||
| .wpuf-block-multiselect__pill-remove { | ||
| background: none; | ||
| border: none; | ||
| padding: 0; | ||
| margin: 0; | ||
| cursor: pointer; | ||
| font-size: 14px; | ||
| line-height: 1; | ||
| color: #757575; | ||
| width: 16px; | ||
| height: 16px; | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| border-radius: 50%; | ||
| } | ||
|
|
||
| .wpuf-block-multiselect__pill-remove:hover { | ||
| background: #ddd; | ||
| color: #1e1e1e; | ||
| } | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| <?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-server-side-render'), 'version' => '40ce483ea2d9243d2140'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ Verification inconclusive
Script executed:
Repository: weDevsOfficial/wp-user-frontend
Repository: weDevsOfficial/wp-user-frontend
Exit code: 0
stdout:
Remove or justify these gitignore entries, as they appear unrelated to this PR's scope.
The additions of
.superpowersanddocs/superpowersto .gitignore have no corresponding files, directories, or code references in the repository, and are not mentioned in the PR objectives focusing on subscription Gutenberg block implementation. These appear to be preemptive entries without clear justification.Either:
🤖 Prompt for AI Agents