Skip to content

enhance: registration form multistep design revamp#1823

Open
sapayth wants to merge 2 commits intoweDevsOfficial:developfrom
sapayth:enhance/registration_form_multistep_design_revamp
Open

enhance: registration form multistep design revamp#1823
sapayth wants to merge 2 commits intoweDevsOfficial:developfrom
sapayth:enhance/registration_form_multistep_design_revamp

Conversation

@sapayth
Copy link
Member

@sapayth sapayth commented Mar 2, 2026

Pro PR #1447

Summary

Redesigns the multistep form progress indicators with a modern, clean look. The Step by Step type now displays numbered circles connected by lines, replacing the old arrow-shaped tab design. The Progressbar type now shows a "Step X of Y" label with a percentage and a smooth horizontal fill bar, replacing the jQuery UI progressbar dependency. Also includes minor UI polish for the account page, dashboard, and subscription templates.

Breaking Changes

  • The jQuery UI progressbar dependency (jquery-ui-progressbar) has been removed. Any custom CSS targeting .ui-progressbar, .ui-widget-header, or .wpuf-progress-percentage inside .wpuf-multistep-progressbar will no longer apply.
  • The step wizard markup changed from <ul><li> elements to <div> based structure. Custom CSS targeting ul.wpuf-step-wizard li will no longer match.

Technical Notes

  • Multistep form initialization and color customization now fully handled by the Pro plugin via the wpuf_form_fields_top action hook (Fields_Manager::step_start_form_top())
  • Removed duplicate multistep rendering logic from both Render_Form classes in the free plugin
  • New CSS classes for the progressbar type: .wpuf-progressbar-header, .wpuf-progressbar-track, .wpuf-progressbar-fill
  • New CSS classes for the step-by-step type: .wpuf-step-wizard, .wpuf-step-item, .wpuf-step-circle, .wpuf-step-label, .wpuf-step-line
  • Form color settings (ms_bgcolor, ms_active_bgcolor, ms_ac_txt_color) continue to work — they now target the new class selectors via inline styles

Summary by CodeRabbit

Release Notes

  • Refactor
    • Overhauled multistep form step indicator styling and progress bar rendering for improved consistency and maintainability across all form layouts.
    • Streamlined navigation button styling with unified appearance and updated active step visual states.
    • Redesigned progress bar display with updated layout and styling for better visual clarity.

@coderabbitai
Copy link

coderabbitai bot commented Mar 2, 2026

Walkthrough

This PR refactors multistep form rendering by consolidating CSS selectors from element-based to class-based selectors, replacing jQuery UI progressbar with custom HTML structure in JavaScript, and removing inline multistep UI from the base plugin, delegating it to the Pro plugin via action hooks.

Changes

Cohort / File(s) Summary
CSS Layout Selectors
assets/css/frontend-form/layout2.css, assets/css/frontend-form/layout3.css, assets/css/frontend-form/layout4.css, assets/css/frontend-form/layout5.css
Consistent refactoring across all layout files: changes CSS selectors from ul.wpuf-step-wizard to .wpuf-step-wizard and removes per-item styling rules (padding, border-radius, pseudo-elements, and active-step indicators) for list items.
Core Form Styling
assets/css/frontend-forms.css, assets/less/frontend-forms.less
Comprehensive overhaul of multistep styling: replaces button selectors with unified classes (button.wpuf-multistep-next-btn, button.wpuf-multistep-prev-btn), introduces new semantic classes (.wpuf-step-item, .wpuf-step-circle, .wpuf-step-label, .wpuf-step-line, .wpuf-progressbar-header, .wpuf-progressbar-track, .wpuf-progressbar-fill), and transitions from list-based to flex-based layout for progress visualization.
JavaScript Form Logic
assets/js/frontend-form.js
Refactors progress bar rendering from jQuery UI widget to custom HTML structure; updates step navigation generation to use new .wpuf-step-item elements with circles and labels; replaces class toggling logic to track active and completed step states.
PHP Form Rendering
class/render-form.php, includes/Render_Form.php
Removes inline multistep progress bar markup and related styling output; delegates multistep form rendering to Pro plugin via action hook Fields_Manager::step_start_form_top.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Suggested labels

needs: dev review

Poem

🐰 Step by step, the wizard walks anew,
No more jQuery chains to construe,
Custom circles dance in flexbox grace,
While Pro plugin takes its rightful place,
A refactored form, both lean and true! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'enhance: registration form multistep design revamp' directly describes the main change: a comprehensive redesign of the multistep form progress indicators across multiple CSS files and JavaScript logic.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

Comment @coderabbitai help to get the list of available commands and usage tips.

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
assets/js/frontend-form.js (1)

6-14: ⚠️ Potential issue | 🟡 Minor

listautowidth counts .wpuf-step-item but still resizes only <li> elements.

With the new div-based step markup, this helper won’t resize current step items, and Line 10 can divide by zero when no children exist.

Suggested fix
-            var count = $(this).children('.wpuf-step-item').length;
-            if ( count === 0 ) {
-                count = $(this).children('li').length;
-            }
-            var liw = w / count;
-            $(this).children('li').each(function(){
-                var s = $(this).outerWidth(true)-$(this).width();
-                $(this).width(liw-s);
-            });
+            var $items = $(this).children('.wpuf-step-item, li');
+            var count = $items.length;
+            if ( count === 0 ) {
+                return;
+            }
+            var itemWidth = w / count;
+            $items.each(function(){
+                var s = $(this).outerWidth(true) - $(this).width();
+                $(this).width(itemWidth - s);
+            });
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@assets/js/frontend-form.js` around lines 6 - 14, The helper currently
computes count using '.wpuf-step-item' but then resizes only 'li' elements and
can divide by zero; update the logic in the list auto-width block to use the
same selector for counting and iterating (either '.wpuf-step-item' or fallback
to 'li' consistently), guard against count === 0 by returning early (or skipping
calculation) to avoid the division when computing liw, and ensure the width
adjustment loop uses the exact node set used to compute count (referencing the
variables count, liw and the selectors '.wpuf-step-item' and 'li').
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@assets/js/frontend-form.js`:
- Around line 186-195: The progress UI code uses document-wide selectors (e.g.,
'fieldset.wpuf-multistep-fieldset' and '.wpuf-multistep-progressbar') which lets
progress state bleed between forms; scope all DOM queries and updates to the
current form container instead (for example replace global selectors with
container.find('fieldset.wpuf-multistep-fieldset') and
container.find('.wpuf-multistep-progressbar')), and apply the same scoping for
all related selectors that set active/completed classes or update percentages
(the code around '.wpuf-multistep-progressbar', any uses at lines ~202-223,
~259, ~289 and ~295). Ensure you locate and update uses in functions that
build/update the barHtml and the handlers that toggle classes so each form
instance updates only its own progress UI.

---

Outside diff comments:
In `@assets/js/frontend-form.js`:
- Around line 6-14: The helper currently computes count using '.wpuf-step-item'
but then resizes only 'li' elements and can divide by zero; update the logic in
the list auto-width block to use the same selector for counting and iterating
(either '.wpuf-step-item' or fallback to 'li' consistently), guard against count
=== 0 by returning early (or skipping calculation) to avoid the division when
computing liw, and ensure the width adjustment loop uses the exact node set used
to compute count (referencing the variables count, liw and the selectors
'.wpuf-step-item' and 'li').

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5f313fa and fe567a2.

📒 Files selected for processing (9)
  • assets/css/frontend-form/layout2.css
  • assets/css/frontend-form/layout3.css
  • assets/css/frontend-form/layout4.css
  • assets/css/frontend-form/layout5.css
  • assets/css/frontend-forms.css
  • assets/js/frontend-form.js
  • assets/less/frontend-forms.less
  • class/render-form.php
  • includes/Render_Form.php
💤 Files with no reviewable changes (1)
  • includes/Render_Form.php

Comment on lines +186 to +195
var totalSteps = $('fieldset.wpuf-multistep-fieldset').length;
var barHtml = '<div class="wpuf-progressbar-header">';
barHtml += '<span class="wpuf-progressbar-step-text">Step 1 of ' + totalSteps + '</span>';
barHtml += '<span class="wpuf-progressbar-percent">0%</span>';
barHtml += '</div>';
barHtml += '<div class="wpuf-progressbar-track">';
barHtml += '<div class="wpuf-progressbar-fill"></div>';
barHtml += '</div>';

$( '.wpuf-multistep-progressbar' ).html( barHtml );
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Progress state updates are globally scoped and can cross-contaminate multiple forms.

Line 186, Line 195, Line 259, and Line 289 use document-wide selectors, so step count/progress and active/completed classes can be computed and applied across unrelated forms.

Suggested fix (scope updates to the current form)
-                var totalSteps = $('fieldset.wpuf-multistep-fieldset').length;
+                var $form = $(this).closest('form.wpuf-form-add');
+                var totalSteps = $form.find('fieldset.wpuf-multistep-fieldset').length;
...
-                $( '.wpuf-multistep-progressbar' ).html( barHtml );
+                $form.find('.wpuf-multistep-progressbar').html( barHtml );
-            if ( progressbar_type == 'step_by_step' ) {
-                $('.wpuf-step-item').each(function(){
+            var $form = current_step.closest('form.wpuf-form-add');
+            if ( progressbar_type == 'step_by_step' ) {
+                $form.find('.wpuf-step-item').each(function(){
...
-                $('.wpuf-step-line').each(function(){
+                $form.find('.wpuf-step-line').each(function(){
...
-                var totalSteps = $('fieldset.wpuf-multistep-fieldset').length;
+                var totalSteps = $form.find('fieldset.wpuf-multistep-fieldset').length;
...
-                $( '.wpuf-progressbar-step-text' ).text( 'Step ' + ( step_number + 1 ) + ' of ' + totalSteps );
-                $( '.wpuf-progressbar-percent' ).text( progressPercent + '%' );
-                $( '.wpuf-progressbar-fill' ).css( 'width', progressPercent + '%' );
+                $form.find('.wpuf-progressbar-step-text').text( 'Step ' + ( step_number + 1 ) + ' of ' + totalSteps );
+                $form.find('.wpuf-progressbar-percent').text( progressPercent + '%' );
+                $form.find('.wpuf-progressbar-fill').css( 'width', progressPercent + '%' );

Also applies to: 202-223, 259-295

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@assets/js/frontend-form.js` around lines 186 - 195, The progress UI code uses
document-wide selectors (e.g., 'fieldset.wpuf-multistep-fieldset' and
'.wpuf-multistep-progressbar') which lets progress state bleed between forms;
scope all DOM queries and updates to the current form container instead (for
example replace global selectors with
container.find('fieldset.wpuf-multistep-fieldset') and
container.find('.wpuf-multistep-progressbar')), and apply the same scoping for
all related selectors that set active/completed classes or update percentages
(the code around '.wpuf-multistep-progressbar', any uses at lines ~202-223,
~259, ~289 and ~295). Ensure you locate and update uses in functions that
build/update the barHtml and the handlers that toggle classes so each form
instance updates only its own progress UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant