Feature/user directory elementor widget (recover #1825)#1879
Feature/user directory elementor widget (recover #1825)#1879arifulhoque7 wants to merge 30 commits into
Conversation
Implements a limited User Directory in the free version, including setup wizard UI, REST API, shortcode handler, and directory limit logic. Adds new assets, React components, admin menu, post type registration, and views for directory/profile layouts. Pro-only features are previewed with disabled states and upgrade prompts, following the Pro Preview pattern.
Added ! prefix to purple color classes in layout helpers and Tailwind config to ensure higher specificity. Updated safelist in Tailwind config to include both prefixed and non-prefixed classes, and adjusted button class usage for consistency.
Improves member count calculation in the REST API and displays live member counts in the directory list. Refines input styles for number fields, updates the toast notification component for better UX, and adds a Pro badge to the 'New Directory' button when the directory limit is reached.
Introduces a new 'Files' tab to the user profile with grouped file display and filtering, excluding private message attachments. Updates Gruntfile.js to add user directory build/watch tasks and ensures profile size is passed to the template. Also adds the corresponding template file for the new tab.
Introduced a wide range of new utility classes to form-builder.css for layout, spacing, sizing, display, border, background, and other style properties. These additions improve flexibility and consistency for admin UI components and support more granular styling options.
Moved user directory assets and configs to modules/user-directory, updated Gruntfile.js to reflect new paths, and adjusted build/watch tasks. Renamed Tailwind and Webpack configs, added PostCSS config, and updated package files to support the new module structure.
Updated sort option values from 'ID' to 'id' and adjusted related logic for consistency. Removed free/pro checks from handlers to simplify state updates. Improved UI/UX for avatar and sort options, added Pro-locked features with badges and tooltips, and enhanced descriptions for better clarity.
Changed primary color scheme from emerald to purple across helpers and Tailwind config. Updated profile layout-2 to add a cover photo section, adjust class names, and improve header overlap. Cleaned up the About tab by removing Pro upgrade prompts and related UI elements.
Changed Tailwind primary and hover colors from purple to emerald green in tailwind.config.js. Updated related CSS class in App.js to use emerald color for upgrade link, ensuring visual consistency with the new color scheme.
Updated avatar rendering to use the same logic as the directory listing, prioritizing custom profile photos, then Gravatar, and finally user initials as a fallback. Improved initials calculation and font sizing for better visual consistency. Simplified markup to show either the avatar image or initials, not both, and ensured consistent sizing and styling.
Add early return if there are no items to display in the pagination shortcode. Also update the current page styling to use layout-specific color classes for better theme consistency.
Refactored multiple files in the user-directory module, including Admin_Menu.php, Directory.php, Helpers.php, Post_Type.php, PrettyUrls.php, Shortcode.php, and profile layout. Updated Toast.js in the frontend and regenerated several minified CSS files to reflect style changes.
Updated both Directory API and Shortcode to skip applying the 'role__in' filter if 'all' is present in the roles array. This prevents unnecessary filtering when all roles should be included.
Updated default and saved settings to include all profile tabs for better Pro compatibility. Improved REST API to merge settings with defaults and existing values, and to sanitize and save all profile tab-related fields. Adjusted frontend JS and wizard defaults to reflect all tabs, and fixed minor issues with sort option selection and profile slug decoding.
Introduce a reusable SingleSelect dropdown and refactor User Directory UI/UX. Key changes: - Add src/js/user-directory/components/common/SingleSelect.js: new reusable single-select dropdown with grouped options and ProBadge support. - Refactor StepAdvanced to use SingleSelect for sort and gallery size, simplify Pro feature handling, change free avatar default from 192→128 and adjust avatar size isFree flags, and convert several hover-only Pro badges into clickable upgrade links. - Update StepLayout to show Pro badge on hover with an upgrade link, simplify border/opacity logic and add local hover state. - Update App.js ProBadge into a clickable upgrade link and reposition/remove some hover-only Pro UI (New Directory button now shows badge inline when limit reached; limit warning block removed/streamlined). - package.json: ensure user-directory build/dev scripts run npm ci before npm run build/dev. - Remove get_current_page() from modules/user-directory/Shortcode.php (cleanup). These changes centralize dropdown logic, improve upgrade CTA consistency, and tidy UI behavior for Pro-locked features.
Replace the native <select> for the profile_base field with a SingleSelect component, passing profileBases as options and adapting the onChange to call the existing handleChange ({ target: { name, value } }). Remove the now-unused inputStyle constant and its comment block. This simplifies the markup and delegates select rendering/styling to the SingleSelect component.
Safelist new button and focus utilities in the user-directory Tailwind config and update DirectoryWizard and StepTabs components. DirectoryWizard: replace verbose button classnames with wpuf-btn-white, add focus ring utilities to Cancel/Prev/Next/Next (submit) buttons for better accessibility, adjust the footer container style to ensure correct left/right positioning and enforce background color. StepTabs: only render the ProBadge on hover to reduce visual clutter. These changes centralize button styles and improve keyboard focus visibility and layout consistency.
…ro-functionality' into feature/user_directory_elementor_widget # Conflicts: # assets/css/admin/subscriptions.min.css # assets/css/ai-form-builder.min.css # assets/css/forms-list.min.css # assets/css/frontend-subscriptions.min.css
…ectory_elementor_widget # Conflicts: # assets/css/admin/subscriptions.min.css # assets/css/admin/wpuf-module.css # assets/css/ai-form-builder.min.css # assets/css/forms-list.min.css # assets/css/frontend-subscriptions.min.css # assets/js/ud-search-shortcode.js # assets/js/wpuf-user-directory-free.asset.php # assets/js/wpuf-user-directory-free.js # assets/js/wpuf-user-directory-free.js.map # assets/js/wpuf-user-directory-frontend.js # includes/Free/Free_Loader.php # includes/functions/modules.php # modules/user-directory/Api/Directory.php # modules/user-directory/DirectoryStyles.php # modules/user-directory/Helpers.php # modules/user-directory/Post_Type.php # modules/user-directory/PrettyUrls.php # modules/user-directory/Shortcode.php # modules/user-directory/User_Directory.php # modules/user-directory/tailwind.config.js # modules/user-directory/views/directory/layout-3.php # modules/user-directory/views/directory/template-parts/pagination-shortcode.php # modules/user-directory/views/directory/template-parts/row-3.php # modules/user-directory/views/directory/template-parts/search-field.php # modules/user-directory/views/directory/template-parts/social-icons.php # modules/user-directory/views/profile/layout-2.php # modules/user-directory/views/profile/template-parts/comments-2.php # modules/user-directory/views/profile/template-parts/file-2.php # modules/user-directory/views/profile/template-parts/posts-2.php # modules/user-directory/webpack.config.js # postcss.user-directory.config.js # src/js/user-directory/App.js # src/js/user-directory/components/DirectoryList.js # src/js/user-directory/components/DirectoryWizard.js # src/js/user-directory/components/common/DeleteConfirmModal.js # src/js/user-directory/components/common/MultiSelect.js # src/js/user-directory/components/common/SingleSelect.js # src/js/user-directory/components/common/Tooltip.js # src/js/user-directory/components/steps/StepAdvanced.js # src/js/user-directory/components/steps/StepTabs.js # src/js/user-directory/utils/avatarSizeHelper.js
…ectory_elementor_widget
|
Warning Review limit reached
More reviews will be available in 6 minutes and 33 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
…nit (review) The fallback all-pages _elementor_data scan ran on every front-end init whenever no flagged page existed. Gate it behind a daily transient; the meta flag is still written on page save (fast path), and the transient is cleared on save so new widget pages are picked up.
|
Review fix pushed: |
The meta flag already routes the page to the fast meta_query path, so the back-fill scan never needs to re-run after a save.
Recovered from #1825 (originally by @sapayth), rebased onto
developwith merge conflicts resolved. Functionality preserved.Supersedes #1825.