-
Notifications
You must be signed in to change notification settings - Fork 808
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
MU WPCOM: dashboard: add daily writing prompt #41094
Conversation
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 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Follow this PR Review Process:
Still unsure? Reach out in #jetpack-developers for guidance! Mu Wpcom plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Wpcomsh plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
@@ -45,6 +45,8 @@ function () {}, | |||
*/ | |||
function enqueue_wpcom_dashboard_widgets() { | |||
$handle = jetpack_mu_wpcom_enqueue_assets( 'wpcom-dashboard-widgets', array( 'js', 'css' ) ); | |||
global $wp_scripts; | |||
$wp_scripts->registered[ $handle ]->deps[] = 'gutenberg-wpcom-apifetch'; |
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.
Unfortunately, we need changes to gutenberg-wpcom
too so that the custom middleware is added.
3614768
to
bc7c97c
Compare
I like that! I was trying to make as compact as possible, but this just looks way better! |
bc7c97c
to
c5a2a2b
Compare
Code Coverage SummaryCoverage changed in 1 file.
|
Looks good to me! :) |
...s/packages/jetpack-mu-wpcom/src/features/wpcom-dashboard-widgets/wpcom-dashboard-widgets.php
Outdated
Show resolved
Hide resolved
86fe9f4
to
1fdc132
Compare
I think what I would prefer design wise, is to remove the gray background and move "next", "previous" next to "view all responses" or alternatively to the top right with a similar link design than "view all responses". Anyway, just random suggestions, no blocker here. |
import { useEffect, useState } from '@wordpress/element'; | ||
import { __ } from '@wordpress/i18n'; | ||
import { addQueryArgs } from '@wordpress/url'; | ||
import moment from 'moment'; |
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.
Feels too much to import moment for that no? Any alternatives?
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.
Yes, can try to avoid it. Honestly, I just copied it from Calypso :)
const [ index, setIndex ] = useState( 0 ); | ||
useEffect( () => { | ||
// See projects/packages/jetpack-mu-wpcom/src/features/wpcom-block-editor-nux/src/blogging-prompts-modal/index.js | ||
const path = addQueryArgs( `/wpcom/v3/blogging-prompts`, { |
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 only tested simple so far, does this work for atomic ...
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.
Also a bit weird that there's no data layer or something, random apiFetch calls scatters like that are hard to evolve and reason about.
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 agree, let's polish this once we have most dashboard functionality in.
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 only tested simple so far, does this work for atomic ...
Yes, it works on Atomic :)
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.
Other than the position of the widget itself (I prefer under Site) I think this is good to land.
See Automattic/wp-calypso#95386.
Proposed changes:
Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions: