Skip to content

fix: design perfection and link for post form custom field modal #1583

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

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

arifulhoque7
Copy link
Contributor

@arifulhoque7 arifulhoque7 commented Jun 4, 2025

Subject: Fix: Ensure "Advanced Options" opens reliably from custom field pop-up

Description:

This update addresses an issue where clicking the "Advanced Options" or "Show data on post" links within the informational pop-up for new custom fields did not consistently navigate to and expand the corresponding "Advanced Options" accordion in the field settings panel.

The primary cause was a timing problem: the JavaScript code attempting to find and interact with the "Advanced Options" toggle was executing before the field settings panel (and its child elements) was fully rendered in the DOM by Vue.js after the panel switch was initiated.

The fix involves the following improvements:

  1. Clickable Links in Pop-up: The "Advanced Options" and "Show data on post" texts in the pop-up message are now interactive links.
  2. Targeted Navigation: When these links are clicked, the appropriate Vuex action (open_field_settings) is dispatched to switch to the correct field's settings panel.
  3. Improved DOM Interaction Timing:
    • A setTimeout is used in conjunction with Vue.nextTick to ensure that operations on the DOM (like finding and clicking the "Advanced Options" toggle) occur only after Vue has processed state changes and the browser has had sufficient time to render the field options panel.
    • The script now accurately identifies the main container for the field options (div.wpuf-form-builder-field-options) rather than relying on a previously assumed ID.
    • It correctly locates the <h3> element serving as the "Advanced Options" toggle by matching its normalized text content (sourced from i18n or __()).
    • The visibility of the advanced options content (within .option-field-section-fields) is checked before attempting a click.
    • If not visible, a click is programmatically triggered on the <h3> element.
  4. Scroll into View: After ensuring the section is open, it is scrolled into the viewport for better user experience.

This revised approach provides a more robust and reliable mechanism for guiding the user to the advanced settings of a newly added custom field directly from the informational pop-up.

Summary by CodeRabbit

  • New Features

    • Tooltip instructions in the form builder now include clickable links for easier navigation to relevant settings and advanced options.
    • Images in tooltips now feature rounded corners for a more polished appearance.
  • Style

    • The text color of certain modal titles is now set to black for improved readability.
    • The cancel button in modals features an updated shade of green for consistency.

@arifulhoque7 arifulhoque7 requested a review from Copilot June 4, 2025 06:00
@arifulhoque7 arifulhoque7 self-assigned this Jun 4, 2025
Copy link

coderabbitai bot commented Jun 4, 2025

Walkthrough

The updates modify the appearance of SweetAlert modal titles by enforcing a black color and enhance the form builder's tooltip interactions. In the form builder, tooltips now include interactive links for navigation and improved image styling, with additional logic for opening and scrolling to specific settings panels.

Changes

Files Change Summary
assets/css/admin.css, assets/less/admin.less Added color: #000000 !important; to h2.swal2-title to enforce black text color in SweetAlert modals.
assets/js/wpuf-form-builder.js Enhanced tooltip content with interactive links, updated image styling, and added logic for panel navigation.
includes/Admin/Forms/Admin_Form_Builder.php Added localization of a new free icon URI for use in the form builder's JavaScript environment.

Suggested labels

QA Approved, Ready to Merge

Suggested reviewers

  • sapayth

Poem

A modal’s title, bold and black,
Tooltips now guide you down the track.
Click a link, and panels appear,
With rounded images bringing cheer.
The builder’s smarter, swift, and neat—
These changes make our forms complete!
🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a06de0f and e253498.

⛔ Files ignored due to path filters (1)
  • assets/images/free-circle.svg is excluded by !**/*.svg
📒 Files selected for processing (2)
  • assets/js/wpuf-form-builder.js (2 hunks)
  • includes/Admin/Forms/Admin_Form_Builder.php (2 hunks)
✅ Files skipped from review due to trivial changes (1)
  • includes/Admin/Forms/Admin_Form_Builder.php
🚧 Files skipped from review as they are similar to previous changes (1)
  • assets/js/wpuf-form-builder.js
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: test
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the custom-field informational popup by making the “Advanced Options” and “Show data on post” texts clickable so they reliably open and expand the corresponding accordion in the field settings panel. It also ensures the accordion is fully rendered before toggling and scrolls it into view, and adds a title color override.

  • Converted popup instructions into interactive links that dispatch a Vuex action to open the correct field’s settings.
  • Introduced setTimeout + Vue.nextTick sequencing to wait for Vue’s DOM render before finding and toggling the “Advanced Options” accordion.
  • Added style overrides for the SweetAlert2 title color in both LESS and compiled CSS.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
assets/less/admin.less Added color: #000000 !important; to the SweetAlert2 title.
assets/css/admin.css Added color: #000000 !important; to the SweetAlert2 title (duplicated in compiled CSS).
assets/js/wpuf-form-builder.js Updated popup HTML to use <a> links; added click handler that commits Vuex, waits for render, toggles the accordion, and scrolls it into view.
Comments suppressed due to low confidence (1)

assets/js/wpuf-form-builder.js:198

  • This new click handler and timing logic are not covered by any tests; consider adding unit or integration tests to validate that the accordion always opens and scrolls under different render timings.
$(modal).find('a.wpuf-swal-action-link[data-action="open-advanced-options"]').on('click', function(e) {

@@ -1,5 +1,6 @@
h2.swal2-title {
line-height: 1.2em;
color: #000000 !important;
Copy link
Preview

Copilot AI Jun 4, 2025

Choose a reason for hiding this comment

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

You’ve added the same style override in both the LESS source and the compiled CSS; maintain a single source of truth in admin.less and recompile to avoid duplication.

Suggested change
color: #000000 !important;
color: #000000 !important; /* Ensure this rule is only in LESS */

Copilot uses AI. Check for mistakes.

@@ -1,5 +1,6 @@
h2.swal2-title {
line-height: 1.2em;
color: #000000 !important;
Copy link
Preview

Copilot AI Jun 4, 2025

Choose a reason for hiding this comment

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

This override is duplicated from admin.less; consider removing it here and generating it via your build process to keep styles in sync.

Suggested change
color: #000000 !important;

Copilot uses AI. Check for mistakes.

Comment on lines 201 to 210
console.log('WPUF Debug: Swal link clicked for field ID:', fieldId);

Swal.close();

setTimeout(() => {
wpuf_form_builder_store.commit('open_field_settings', fieldId);
console.log('WPUF Debug: open_field_settings committed.');

Vue.nextTick(() => {
console.log('WPUF Debug: Vue.nextTick for toggling advanced options triggered.');
Copy link
Preview

Copilot AI Jun 4, 2025

Choose a reason for hiding this comment

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

[nitpick] Remove or wrap these console logging statements so they don’t clutter the console in production environments.

Suggested change
console.log('WPUF Debug: Swal link clicked for field ID:', fieldId);
Swal.close();
setTimeout(() => {
wpuf_form_builder_store.commit('open_field_settings', fieldId);
console.log('WPUF Debug: open_field_settings committed.');
Vue.nextTick(() => {
console.log('WPUF Debug: Vue.nextTick for toggling advanced options triggered.');
if (isDebugMode) {
console.log('WPUF Debug: Swal link clicked for field ID:', fieldId);
}
Swal.close();
setTimeout(() => {
wpuf_form_builder_store.commit('open_field_settings', fieldId);
if (isDebugMode) {
console.log('WPUF Debug: open_field_settings committed.');
}
Vue.nextTick(() => {
if (isDebugMode) {
console.log('WPUF Debug: Vue.nextTick for toggling advanced options triggered.');
}

Copilot uses AI. Check for mistakes.

html += sprintf( '<p class="wpuf-text-base">%s<span class="wpuf-text-primary">%s</span>%s<span class="wpuf-text-primary">%s</span>%s</p>', __( 'Edit the custom field inside the post form and on the right side you will see', 'wp-user-frontend' ), __( '"Advanced Options".', 'wp-user-frontend' ), __( ' Expand that, scroll down and you will see ', 'wp-user-frontend' ), __( '"Show data on post"', 'wp-user-frontend' ), __( ' - set this yes.', 'wp-user-frontend' ) );
html += '<img src="' + image_two + '" alt="custom field data">';
var fieldIdForLink = payload.field.id;
html += sprintf( '<p class="wpuf-text-base">%s<a href="#" class="wpuf-text-primary wpuf-swal-action-link wpuf-font-bold" data-action="open-advanced-options" data-field-id="%s">%s</a>%s<a href="#" class="wpuf-text-primary wpuf-swal-action-link wpuf-font-bold" data-action="open-advanced-options" data-field-id="%s">%s</a>%s</p>',
Copy link
Preview

Copilot AI Jun 4, 2025

Choose a reason for hiding this comment

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

[nitpick] Using <a href="#"> for actions can cause unexpected navigation; consider using a <button> or adding role="button" and an aria-label for improved accessibility.

Copilot uses AI. Check for mistakes.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 23e55af and 8b24a2a.

📒 Files selected for processing (3)
  • assets/css/admin.css (1 hunks)
  • assets/js/wpuf-form-builder.js (2 hunks)
  • assets/less/admin.less (1 hunks)
🧰 Additional context used
🪛 Biome (1.9.4)
assets/js/wpuf-form-builder.js

[error] 263-263: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


[error] 265-265: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


[error] 276-276: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Run PHPCS inspection
  • GitHub Check: test
🔇 Additional comments (3)
assets/css/admin.css (1)

1-4: LGTM!

The CSS change properly sets the SweetAlert2 modal title color to black, ensuring consistent visibility across different themes.

assets/less/admin.less (1)

1-4: LGTM!

The LESS change correctly mirrors the CSS update, maintaining consistency between source and compiled files.

assets/js/wpuf-form-builder.js (1)

168-196: Well-implemented interactive tooltip enhancements!

The conversion of static instructions to clickable links improves user experience by allowing direct navigation to relevant settings. The rounded corners on images and updated button color enhance visual consistency.

Comment on lines 197 to 301

Swal.close();

setTimeout(() => {
wpuf_form_builder_store.commit('open_field_settings', fieldId);
console.log('WPUF Debug: open_field_settings committed.');

Vue.nextTick(() => {
console.log('WPUF Debug: Vue.nextTick for toggling advanced options triggered.');

setTimeout(() => { // Single timeout after Vue.nextTick
console.log('WPUF Debug: Inner setTimeout fired, attempting to find and toggle panel elements.');

let advancedOptionsTargetText = '';
if (typeof wpuf_form_builder_mixins !== 'undefined' &&
typeof wpuf_form_builder_mixins(Vue.prototype).i18n !== 'undefined' &&
wpuf_form_builder_mixins(Vue.prototype).i18n.advanced_options) {
advancedOptionsTargetText = wpuf_form_builder_mixins(Vue.prototype).i18n.advanced_options;
} else {
advancedOptionsTargetText = __('"Advanced Options".', 'wp-user-frontend');
}
advancedOptionsTargetText = advancedOptionsTargetText.replace(/"/g, '').replace(/\.$/, "").trim().toLowerCase();
console.log('WPUF Debug: Target Adv. Opt. Text (Normalized):', advancedOptionsTargetText);

var $fieldOptionsMainContainer = $('div.wpuf-form-builder-field-options');

if (!$fieldOptionsMainContainer.length) {
console.warn('WPUF Form Builder Debug: Field options main container "div.wpuf-form-builder-field-options" NOT FOUND after delay.');
return;
}
// Check if the loader/placeholder is still visible
if ($fieldOptionsMainContainer.find('> div:first-child[class*="text-center"]').is(':visible') && $fieldOptionsMainContainer.find('.option-fields-section').length === 0) {
console.warn('WPUF Form Builder Debug: Loader/placeholder seems to be still visible or settings sections not rendered in .wpuf-form-builder-field-options. Action aborted.');
return;
}

console.log('WPUF Debug: Field options main container "div.wpuf-form-builder-field-options" found:', $fieldOptionsMainContainer[0]);

var $advancedOptionsToggle, $advancedOptionsContentDiv, $sectionToScroll;
var $sections = $fieldOptionsMainContainer.find('.option-fields-section');
console.log('WPUF Debug: Found ' + $sections.length + ' .option-fields-section elements within the main container.');

$sections.each(function(index) {
var $parentSection = $(this);
var $h3 = $parentSection.find('h3').first();
if (!$h3.length) return true;

var rawH3Text = $h3.clone().children('i').remove().end().text();
var normalizedH3Text = rawH3Text.trim().toLowerCase().replace(/\.$/, "");

console.log('WPUF Debug: (Section ' + index + ') H3 raw: "' + rawH3Text + '", Normalized: "' + normalizedH3Text + '"');

if (normalizedH3Text === advancedOptionsTargetText) {
$advancedOptionsToggle = $h3;
$advancedOptionsContentDiv = $parentSection.find('div.option-field-section-fields').first();
$sectionToScroll = $parentSection;
console.log('WPUF Debug: Matched h3 for "Advanced Options":', $advancedOptionsToggle[0]);
return false;
}
});

if ($advancedOptionsToggle && $advancedOptionsToggle.length) {
var isContentVisible = false;
if ($advancedOptionsContentDiv && $advancedOptionsContentDiv.length) {
isContentVisible = $advancedOptionsContentDiv.is(':visible');
console.log('WPUF Debug: Advanced Options content visible before click?', isContentVisible);
} else {
console.warn('WPUF Form Builder Debug: Advanced options content div (.option-field-section-fields) not found relative to matched h3.');
}

if (!isContentVisible) {
console.log('WPUF Debug: Attempting to click "Advanced Options" h3 toggle.');
$advancedOptionsToggle.trigger('click');
setTimeout(() => {
if ($advancedOptionsContentDiv && $advancedOptionsContentDiv.length) {
console.log('WPUF Debug: Content visible after click and 150ms delay?', $advancedOptionsContentDiv.is(':visible'));
}
}, 150);
} else {
console.log('WPUF Debug: "Advanced Options" content already visible.');
}

if (!$sectionToScroll || !$sectionToScroll.length) $sectionToScroll = $advancedOptionsToggle;

setTimeout(() => {
const elementToScrollTo = $sectionToScroll.get(0);
if (elementToScrollTo && typeof elementToScrollTo.scrollIntoView === 'function') {
elementToScrollTo.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' });
console.log('WPUF Debug: Scrolled "Advanced Options" section into view.');
}
}, 350);
} else {
console.warn('WPUF Form Builder Debug: Could not find "Advanced Options" h3 toggle based on text: "' + advancedOptionsTargetText + '".');
}
}, 400); // Inner timeout duration (e.g., 400ms)

});
}, 250);
});
}
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Consider production-ready improvements for the advanced options toggle logic.

While the implementation is thorough, consider the following improvements:

  1. Debug logging: The extensive console.log statements should be removed or wrapped in a debug flag for production builds.
  2. Timing reliability: The nested timeouts with fixed delays (250ms, 400ms, 150ms, 350ms) may fail on slower systems. Consider using a more robust approach like mutation observers or retry logic with exponential backoff.
-                    didOpen: (modal) => {
+                    didOpen: (modal) => {
+                        const DEBUG = false; // Set to true during development
                         $(modal).find('a.wpuf-swal-action-link[data-action="open-advanced-options"]').on('click', function(e) {
                             e.preventDefault();
                             var fieldId = $(this).data('field-id');
-                            console.log('WPUF Debug: Swal link clicked for field ID:', fieldId);
+                            if (DEBUG) console.log('WPUF Debug: Swal link clicked for field ID:', fieldId);

                             Swal.close();

-                            setTimeout(() => { 
+                            // Use a more robust approach with retry logic
+                            const waitForFieldOptions = (attempts = 0, maxAttempts = 5) => {
                                 wpuf_form_builder_store.commit('open_field_settings', fieldId);
-                                console.log('WPUF Debug: open_field_settings committed.');
+                                if (DEBUG) console.log('WPUF Debug: open_field_settings committed.');

                                 Vue.nextTick(() => {
-                                    console.log('WPUF Debug: Vue.nextTick for toggling advanced options triggered.');
+                                    if (DEBUG) console.log('WPUF Debug: Vue.nextTick for toggling advanced options triggered.');
                                     
                                     setTimeout(() => { // Single timeout after Vue.nextTick
-                                        console.log('WPUF Debug: Inner setTimeout fired, attempting to find and toggle panel elements.');
+                                        if (DEBUG) console.log('WPUF Debug: Inner setTimeout fired, attempting to find and toggle panel elements.');

Committable suggestion skipped: line range outside the PR's diff.

🧰 Tools
🪛 Biome (1.9.4)

[error] 263-263: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


[error] 265-265: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


[error] 276-276: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)

🤖 Prompt for AI Agents
In assets/js/wpuf-form-builder.js around lines 197 to 301, remove or
conditionally wrap all console.log and console.warn debug statements behind a
debug flag to avoid cluttering production logs. Replace the nested fixed-delay
setTimeout calls with a more reliable mechanism such as MutationObserver to
detect DOM changes or implement retry logic with exponential backoff to ensure
elements are ready before proceeding, improving timing reliability on slower
systems.

@arifulhoque7 arifulhoque7 requested a review from sapayth June 4, 2025 06:07
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
assets/js/wpuf-form-builder.js (1)

172-183: Address accessibility concern for link elements.

The use of href="#" for action links was previously flagged for accessibility concerns. Consider using <button> elements or adding proper role="button" and aria-label attributes.

🧹 Nitpick comments (1)
assets/js/wpuf-form-builder.js (1)

215-295: Consider simplifying the text matching and DOM manipulation logic.

The current approach of normalizing and matching text content for "Advanced Options" could be fragile if the UI text changes. Consider these improvements:

  1. Use data attributes: Add data-section="advanced-options" to the relevant DOM elements during rendering
  2. Centralize selectors: Define reusable CSS selectors instead of complex jQuery traversal
  3. Extract helper functions: Break down the complex logic into smaller, testable functions

Example approach:

// Helper function for finding sections by data attribute
function findAdvancedOptionsSection() {
    return $('.wpuf-form-builder-field-options [data-section="advanced-options"]');
}

// Helper function for toggling section
function toggleAdvancedOptions($section) {
    const $toggle = $section.find('h3').first();
    const $content = $section.find('.option-field-section-fields').first();
    
    if (!$content.is(':visible')) {
        $toggle.trigger('click');
    }
    
    return $content;
}

This approach would be more maintainable and less dependent on internationalized text content.

🧰 Tools
🪛 Biome (1.9.4)

[error] 263-263: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


[error] 265-265: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


[error] 276-276: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8b24a2a and bef0cf4.

📒 Files selected for processing (1)
  • assets/js/wpuf-form-builder.js (3 hunks)
🧰 Additional context used
🪛 Biome (1.9.4)
assets/js/wpuf-form-builder.js

[error] 263-263: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


[error] 265-265: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


[error] 276-276: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: test
  • GitHub Check: Run PHPCS inspection
🔇 Additional comments (3)
assets/js/wpuf-form-builder.js (3)

168-169: LGTM: Proper link construction and styling.

The HTML construction correctly creates a link to the settings page with appropriate target and internationalization.


196-196: LGTM: Simple color adjustment.

The cancel button color change is a minor styling improvement.


1283-1283: LGTM: Removed unnecessary console logging.

Good practice to remove console logging from production code, especially in error handlers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant