-
Notifications
You must be signed in to change notification settings - Fork 41
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
WPGatsby Stability #74
Conversation
# Conflicts: # src/ActionMonitor/ActionMonitor.php
…expensive-meta-queries # Conflicts: # src/ActionMonitor/ActionMonitor.php
- add support for create, update, delete of Media, Nav Menus, Nav Menu Items, Posts (of all tracked post types), Terms (of all tracked taxonomies), Post Type/Taxonomy registry changes, and Users. - Fixed `preview_jwt_secret` setting to save once if it doesn't yet exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this is incredible and such a valuable PR! There are just a couple small things I noticed
Thing 1:
The user isn't updated when saving a post anymore. We need the user node to update so it has the correct list of child pages/posts/cpts attached to it.
On the first save of a post I saw that it tried to delete a post as a user:
I'm not sure where "A published post" came from because I don't have a post or user called that
On further updates I don't see that anymore but I don't see the author being updated either:
Thing 2:
The title is displayed in the terminal output so we want to adjust the action monitor titles to account for that for all the different node types:
Ideally it'd still say "create page New page 2" instead of "create page CREATE New page 2". Same for other types. Generally the action monitor title should be the title of the thing being changed.
We could change it on the source plugin side so it shows the action monitor title instead of building a string out of the action type, name, and type, but that would be a breaking change 🤔 it's probably easier to keep the action monitor titles the same as the thing they're tracking.
For any reference fields it might be nicer to return null instead of "none" to make it more gql-like :)
Holy crap, updating the homepage works!! 💜 🔥 🔥 that's so awesome!
And settings! 🚀 🚀 🚀
The post type stuff is amazing 😱 this is all amazing!
Oo 2 more small things. 1: I think we need to merge master in here. I merged it locally but I'm not sure if I resolved the conflict properly. 2: Could you add an |
…wer versions of phpunit have a breaking change - update titles of actions, per code review - update post monitor to log user action when post authors are changed - add test for changing authors on a post, to ensure it creates actions for the post and the previous and new author
- remove unused insertNewAction function from ActionMonitor.php
…wpgatsby-stability # Conflicts: # CHANGELOG.md # src/ActionMonitor/ActionMonitor.php # src/Admin/Preview.php
This reverts commit 5601181.
…tch what we test for.
- run php-cs to update code style
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested these changes locally with the latest source plugin, and not only do they fix some issues with the latest release of wpgatsby, the schema seems to be resolving more quickly. great work!
- update test for re-assigning authors. This will be a breaking test now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jason and I just spent 5 hours reviewing this whole thing 😱 and it's ready to merge and release! :D
We're waiting until Monday because we need to make a new source plugin release at the same time since this is a breaking change.
awesome work! yeah all the tests are passing with this branch against the source plugin primary branch. |
- Update UserMonitor to track posts that need to be re-assigned and log the action for each post - Update ActionMonitorTest to properly test reassigning posts after a user is deleted - Add test for deleting menus
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple more changes!
/** | ||
* Initialize UserMonitor Actions | ||
* | ||
* @return mixed|void | ||
*/ | ||
public function init() { | ||
public function init() {if ( ! empty( $post_ids ) && is_array( $post_ids ) ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the formatting is a bit weird here. And where does $post_ids come from? Is that a global?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😱 this was some funky copy-pasta.
… of the name "Menu" as a prefix - Update code formatting in PostMonitor.php - remove copy-pasta from UserMonitor.php - Update action log for delete and re-assign to only log actions for published posts that are being re-assigned
@jasonbahl is this ready? |
@TylerBarnes I think so! |
Looks and works great :D again, amazing work @jasonbahl , so stoked about this! I'll merge and release shortly |
This Pull Request works toward getting the plugin more stable by doing the following:
This PR addresses the following issues:
NON_NODE_ROOT_FIELDS
action. A few specific actions trigger specific actions for specific nodes. For example, changing the home_page triggers an update for the new page and the old page being changed as the URI is now different.REFETCH_ALL
Actionpublic
andshow_in_graphql
and there are filters to override as needed.