-
Notifications
You must be signed in to change notification settings - Fork 843
Forms: remove Dashboard Switch class #45282
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
Conversation
…d new static methods
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! Jetpack plugin: The Jetpack plugin has different release cadences depending on the platform:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
Code Coverage SummaryCoverage changed in 8 files. Only the first 5 are listed here.
Full summary · PHP report · JS report Coverage check overridden by
Coverage tests to be added later
|
9123262 to
0e9a2ce
Compare
| $footer_mark_as_spam_url = ''; | ||
| if ( $feedback_status !== 'jp-temp-feedback' ) { | ||
| $dashboard_url = ( new Dashboard_View_Switch() )->get_forms_admin_url( $status, true ) . '&r=' . $post_id; | ||
| $dashboard_url = Forms_Dashboard::get_forms_admin_url( $status ) . '&r=' . $post_id; |
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.
Nitpick: $status is a confusing name, $tab would work better.
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.
I'll agree with you semantically, but as the tab also represents the post status, I think it can stay. Besides, it's unrelated to the main goal of this PR.
vianasw
left a comment
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.
I've added a few comments that aren't blockers, but there are e2e tests failing that need fixing. I've manually tested it and everything seemed to be working fine.
Proposed changes:
This PR removes Dashboard_View_Switch class, which has been in deprecation since moving towards the new dashboard and removal of the legacy menu/listing.
This shouldn't be mixed with current proposal to deprecate Admin class, which carries more legacy and backwards compatibility checks.
Other information:
Jetpack product discussion
None yet, but there will be
Does this pull request change what data or activity we track or use?
No
Testing instructions:
As with any removal, the idea is that nothing has changed and tests pass. Special attention to any of the tasks in charge of Dashboard View Switch, although most of them had been deprecated via conditionals based on flags that are now set to default values that never make it through those conditionals.
Also, moved some of the useful methods on the class to static methods on Dashboard:
get_forms_admin_urlappend_tab_to_urlis_jetpack_forms_admin_page