-
Notifications
You must be signed in to change notification settings - Fork 3
feat: Enhanced Plugin Composer Settings UI and Build System #16
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
mrabbani
wants to merge
27
commits into
master
Choose a base branch
from
refactor/through-ai
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
- Added modern React-based settings interface with tabbed navigation - Implemented card headers with titles and reset button positioning - Added confirmation modal for reset functionality to prevent accidental resets - Fixed input clearing issues by using nullish coalescing operator - Enhanced CSS styling with full-width layout and improved button styling - Removed button-like styling from active tabs and badges - Added comprehensive .gitignore for build artifacts - Updated webpack configuration to include CSS in build process - Added proper asset management and dependency injection - Improved user experience with loading states and error handling
- Added languages directory with POT file generation - Updated build script to generate localization files using WP-CLI - Created plugin-composer.pot with 488 lines of translatable strings - Added sample Spanish PO file (plugin-composer-es_ES.po) - Build process now includes languages directory in final package - All user-facing strings are now translatable
- Added load_textdomain() method to load plugin translations - Added PLUGIN_COMPOSER_LANG_DIR constant for languages directory - Hooked translation loading to 'init' action with priority 0 - Ensures translations are loaded early in WordPress lifecycle - Uses 'welabs-plugin-composer' text domain - Translations will be loaded from /languages directory
- Fix text domain consistency across all files (plugin-composer → welabs-plugin-composer) - Fix translation loading timing by hooking to init action - Add new translatable strings (welcome message, login message) - Update Spanish translations with comprehensive coverage - Regenerate MO file for proper translation loading - Ensure translations work in both admin and frontend contexts Files modified: - plugin-composer.php: Fixed text domain declaration - includes/PluginComposer.php: Fixed translation loading mechanism - includes/Admin/Settings.php: Added welcome message translation - includes/ShortCode.php: Fixed text domain consistency - languages/plugin-composer.pot: Added new translatable strings - languages/plugin-composer-es_ES.po: Added Spanish translations - languages/plugin-composer-es_ES.mo: Regenerated binary translation file Testing confirmed: Translations work properly in admin settings and frontend shortcode.
- Fix Rate Limit Attempts number input not displaying after save - Fix selected tab not being preserved after page reload - Add comprehensive REST API schema and validation - Improve number input handling with proper parsing - Add localStorage persistence for active tab - Add debug logging for troubleshooting - Reload settings after successful save to ensure UI consistency - Add proper validation and sanitization callbacks - Enhance error handling and user feedback Files modified: - src/admin/settings.js: Fixed UI issues and added tab persistence - includes/Api/Admin/SettingsController.php: Added complete schema and validation - assets/admin/settings.js: Built version with fixes - assets/admin/settings.asset.php: Updated asset manifest
- Fix RangeControl max value mismatch (50 -> 100) to match backend validation - Add comprehensive debug logging to track data flow - Temporarily disable REST API args validation to isolate the issue - Add frontend debugging to log rate_limit_attempts value and type - Ensure proper integer parsing and validation The issue was caused by a mismatch between frontend RangeControl max (50) and backend validation max (100), causing validation failures.
- Re-enable REST API args validation now that range mismatch is fixed - RangeControl max value now matches backend validation (100) - Added comprehensive debug logging for troubleshooting - Frontend and backend validation ranges are now aligned
- Add permission check debugging to track authentication issues - Add detailed logging for GET settings to see what's being returned - Add comprehensive logging for all settings processing in update - Track missing settings in request parameters - Enhanced frontend debugging to log settings keys and values This will help identify whether the issue is: 1. Authentication/permission problems 2. Settings not being saved properly 3. Settings not being loaded properly 4. Frontend-backend data format mismatches
- Remove parseInt() from onChange handlers to allow proper value updates - Fix value display to use raw settings values instead of forced parsing - Allow users to type freely in numeric inputs without forced reversion - Fix all numeric inputs: rate_limit_attempts, rate_limit_duration, max_plugin_name_length, max_description_length, max_license_length, max_author_name_length, file_permissions, file_cleanup_delay The issue was that parseInt() in onChange was reverting invalid values to defaults, preventing users from entering new values properly.
- Add width: 100% wrapper div to all form controls - Ensure SelectControl, ToggleControl, and TextControl have consistent width - Apply consistent styling to Required Capability, Default Plugin Type, Allow Guest Access, Allowed File Extensions, and all ToggleControl fields - All input fields now have the same width as the Required Capability field
- Replace 100% width with max-width: 400px for better visual balance - Apply consistent max-width to all text inputs, select controls, and range controls - Use CSS classes instead of inline styles for better maintainability - Form fields now have a reasonable width that looks professional
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.
Enhanced Plugin Composer Settings UI and Build System
Ready for review!