Sync master from upstream#50
Merged
Merged
Conversation
- Add resolve_global_color() method to resolve global color references - Add get_resolved_color() static method for Pro plugin to reuse - Update get_block_attrs() to resolve global colors for color controls - Add globals model listener in JS for live preview updates - Use CSS variables as primary method for resolving global colors in preview
- Create shared styling-utils.js in src/utils/ with common constants and functions - Rename elementor-styling-preview.js to elementor-preview-styling.js for consistency - Update imports to use @utils alias for better maintainability - Add webpack entry points for previewStyling and elementorPreviewStyling - Update PHP to load bundled scripts from assets/build/ This reduces code duplication between preview-styling.js and elementor-preview-styling.js by extracting common color maps (PRIMARY_COLOR_MAP, TEXT_COLOR_MAP) and helper functions (applyColorMap, resetColorMap, applyDimensions, resetDimensions). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fixed gradient preview not updating when angle/location changes by initializing gradient values from settings on every control change - Fixed color_b_stop field name (was using wrong color_stop_b) - Restricted location sliders to % only and angle slider to deg only - Added responsive:false to hide responsive controls on gradient sliders - Added srfm-elementor-styling-init event for Pro plugin initialization - Removed debug console.log statements
- Use Helper::get_string_value() for type-safe array value extraction - Add Group_Control_Background stub to Elementor stubs file
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests cover get_resolved_color() and build_gradient_css() with 23 test cases including edge cases for missing/invalid inputs, gradient types, global color fallbacks, and default value handling. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
SF-2804 - Added Test Cases
- Add clarifying comment in preview-styling.js explaining the deliberate bgImagePosition overlap in SIMPLE_CSS_MAP loop vs explicit handler - Add unit allowlist validation for formPadding and formBorderRadius dimension controls in form-widget.php (defense-in-depth) - Fix empty get_type() stub to return 'background' matching real Elementor Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implement styling options for the Bricks embed block matching Gutenberg and Elementor implementations. Adds Form Styling, Layout, Button, and Fields accordion groups with controls for colors, background, padding, border radius, alignment, and field spacing. Includes hook points for Pro extensibility and direct Generate_Form_Markup integration replacing shortcode. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add default values to color controls and fix gradient angle defaults (180 → 90) to match the Gutenberg embed block attribute definitions.
- Use absint() instead of intval() for form ID (prevents negative IDs) - Validate color values in resolve_bricks_color() via sanitize_hex_color() and an rgb/rgba/hsl/hsla allowlist instead of returning raw strings - Replace esc_attr() with absint() for numeric CSS values in gradient builder - Allowlist spacing units in map_bricks_spacing() and simplify zero-value condition Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Covers resolve_bricks_color(), map_bricks_spacing(), and build_bricks_gradient_css() with 40 assertions including edge cases for invalid input, CSS injection attempts, unit allowlisting, and gradient type fallback behaviour. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…h keys - Sanitize bgImage URL with esc_url_raw() - Fix gradient angle default mismatch (180 → 90) to match Bricks control - Cast spacing dimension values with intval() before CSS output - Validate passthrough keys against allowed values for defense-in-depth - Add inline comment explaining custom 'protected' post status - Update test assertion for corrected default angle Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…, and correctness - Add event.origin validation on PostMessage listener in preview-styling.js - Replace wildcard '*' target origin with specific iframe origin in Edit.js - Reset static $current_block_attrs before returning markup to prevent stale data leak - Add missing [id] dependency array to useSelect hook in Edit.js - Fix ref.current anti-pattern in useEffect dependency array - Add enum constraints on formPaddingUnit and formBorderRadiusUnit in block.json Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the two-step inheritStyling checkbox + formTheme select with a single formTheme select (inherit/default). Update required conditions, get_block_attrs(), and tests accordingly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the two-step inheritStyling switcher + formTheme select with a single formTheme select (inherit/default). Update all section conditions, control conditions, get_block_attrs(), and preview JS accordingly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the two-step inheritStyling toggle + formTheme select with a single formTheme select control with inherit/default/custom options. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…newlines
fix: apply nl2br to textarea values in {form:field} smart tags
Manual slug edits via SlugControl were not removing the block from _slugAutoLabels, so prepareBlockSlugs could re-derive the slug on label change. Additionally, setFormSpecificSmartTags was called on every Dialog render (not in a useEffect), triggering prepareBlockSlugs repeatedly and overwriting manual slugs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When clicking outside the editor, the block deselects and SlugControl unmounts before onBlur fires, losing the pending slug edit. Added a cleanup effect that commits the slug via refs on unmount. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move onboarding analytics data from regular plugin stats (MongoDB) into the onboarding_completed event properties (ClickHouse sureforms_events). Properties sent: skipped_steps, suremail_installed, account_connected, completed, exited_early, selected_premium_features, premium_features_count. All values are strings to match ClickHouse Map(String, String) schema. Includes one-time dedup flush so existing sites re-send with full data.
feat: filter-based Field Slug panel after Attributes panel
Skip the get_posts meta_query for first_ai_form_generated after the event is already tracked, avoiding an unnecessary DB query on every admin page load. Co-authored-by: vanshk141999 <67928850+vanshk141999@users.noreply.github.com>
…t-properties enhance: send full onboarding details in onboarding_completed event
Resolve conflict in admin/analytics.php by keeping dev's richer onboarding_completed event tracking (v2 flush migration + detailed properties) over the PR's simpler skipped-only approach.
Add BSF Analytics event tracking
…1.23 chore: update bsf-analytics to v1.1.23
Dev to Next Release 2.7.1
Version Bump 2.7.1
Pass the toolbar DOM element directly to Quill's toolbar config instead of a CSS selector string. The block editor's iframe prevents document.querySelector from finding the toolbar element, causing "Cannot read properties of null (reading 'classList')" on toggle. Closes #2542 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…lassList-error Fix: Textarea Rich Text Editor classList error on toggle
Auto-generated by /i18n command on PR #2539
chore: update i18n translations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sureformsrepository master branch into the public mirror.Test plan