Fix plugin native issues#148
Merged
Merged
Conversation
- Import `setUserEditTarget` synchronously in `desktop.ts` to ensure the user-edit window reads the correct target immediately after a row click, preventing fallback to the viewer's ID. - Update `index.ts` to re-pin the active window ID before re-mounting the user-edit form, ensuring the correct configuration is used and preventing stale subscriptions from clearing the target. - Refactor `user-edit-render.ts` to merge configuration from both the user-edit and users windows, ensuring that role and color scheme options are available even if the active window ID has drifted. - Implement a new `resolveProfileConfig` function to layer user-edit window configuration under the active configuration, providing necessary keys for rendering. - Add tests to verify the correct behavior of the user-edit window, including role assignment, color scheme selection, and ensuring the UI reflects changes after updates. - Ensure that the role select remains hidden when the viewer is editing their own profile, matching core behavior.
- Updated the `mountProfileForm` function to ensure that boolean values from checkbox inputs are converted to their corresponding string representations ('true'/'false') before being sent in the REST API request. This prevents schema validation errors related to the `meta.rich_editing` field.
- Added a regression test to verify that all meta checkbox values are saved as strings, ensuring compliance with the WP REST schema and preventing silent failures during user role changes.
… edit save confirmation - Updated the notification mechanism to use `wp.desktop.showToast` for displaying save success messages. - Introduced `ShellToastApi` interface to define the new toast API. - Modified `notifyToast` function to handle different durations for success and error messages. - Adjusted the profile header update logic to minimize DOM manipulation during user profile updates. - Added tests to ensure the new toast notification is triggered correctly on successful save.
…ve menu refresh logic
Contributor
✅ WordPress Plugin Check Report
📊 ReportAll checks passed! No errors or warnings found. 🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check |
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
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.
Closes #145