Skip to content

Conversation

@soderlind
Copy link
Owner

This pull request introduces a new feature for creating folders directly from the rule editor modal, improves the user experience for error handling, and adds protections against race conditions during folder operations. It also updates the CSS to support the new UI elements and error states.

New Features:

  • Added a "+" button next to the folder dropdown in the rule editor modal, allowing users to create new folders without leaving the modal. The new folder is automatically selected after creation, and users can select parent folders hierarchically when creating nested folders. [1] [2]

User Experience Improvements:

  • Error messages in the rule editor are now displayed as proper error elements (red text) instead of help text, making them more visible and accessible. [1] [2]

Reliability Improvements:

  • Added race condition protections for folder creation and fetching to prevent inconsistent UI states.

Build and Asset Updates:

  • Updated the asset version in build/index.asset.php to reflect the new changes.

- Updated package.json and vmfa-rules-engine.php to version 1.2.0.
- Updated readme.txt to reflect the new stable tag and added detailed changelog entries for version 1.2.0:
  - Added a "Create folder" button in the rule editor modal to allow users to create folders without leaving the editor.
  - Implemented automatic selection of newly created folders.
  - Introduced hierarchical parent folder selection for nested folders.
  - Improved error messages to be displayed as proper error elements (red text).
  - Enhanced race condition protections for folder operations.

feat: Enhance RuleEditor component

- Modified RuleEditor.jsx to include functionality for creating folders:
  - Added state management for new folder creation, including folder name, parent folder selection, and error handling.
  - Integrated API fetch to create folders and update the folder list upon successful creation.
  - Added a modal for folder creation with input validation and error messaging.
  - Updated folder selection logic to handle newly created folders effectively.

feat: Update RulesPanel component

- Updated RulesPanel.jsx to manage folder state and fetch folders from the API:
  - Added state management for folders and implemented a fetch function to retrieve folder data.
  - Set up an event listener to sync folder updates from the parent plugin.

style: Improve styling for error messages and folder selection UI

- Updated admin.scss to style error messages in red and enhance the layout of the folder selection UI in the RuleEditor component.
- Added specific styles for the folder creation modal and its elements to improve user experience.

fix: Update composer dependencies

- Updated vendor/composer/installed.php to reflect the latest commit reference for the plugin.
@soderlind soderlind merged commit 3feb95a into main Jan 23, 2026
3 checks passed
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