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
My Home: Add "Connect social media accounts" Task #41018
Conversation
Thanks for jumping into this one @Aurorum! 💖I'm going to ask folks some open questions to help think though next steps
|
Co-Authored-By: Miguel Torres <miguelmariatorresrojas@gmail.com>
I'll try and see if we can use the new ✨ illustrations for this one. |
Updated the PR title to reflect that this is focusing on the social connect task (so this is now part of #40734 rather than fixing it). |
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 works quite well for me, @Aurorum. Can we maybe avoid rendering the task card until we add it to the API?
Also noted the padding on the card is not homogenous (lower padding bottom than top).
I also agree with @gwwar above and think it'd be good if we link back to My Home when the guided tour is over. For reference, this how it looks on the site title update guided tour:
I'll try and see if we can use the new ✨ illustrations for this one.
I think we can handle that on a follow-up PR and land the card with a temporary illustration if we make sure the task card doesn't show up until the API returns it.
client/layout/guided-tours/tours/marketing-connections-tour/index.js
Outdated
Show resolved
Hide resolved
Looks like the tests are failing on |
I think Circle needs to roll back an update. We're seeing similar issues on other PRs |
It may be worth rebasing @Aurorum with master, we've just switched over to yarn from npm. Let me know if you had any questions getting setup. |
Thanks @gwwar! I've managed to get it working with yarn. I've fixed the issue with the support article dialog displaying beneath the guided tour, but I'm still struggling to add an extra step to the tour for when after a connection has been made. I've tried using /**
* Returns true if the selected site has any publicize connections.
*
* @param {object} state Global state tree
* @returns {boolean} True if site has any publicize connections, false otherwise.
*/
export const doesSelectedSiteHavePublicizeConnections = state => {
const siteId = getSelectedSiteId( state );
if ( ! siteId ) {
return false;
}
return getConnectionsBySiteId( state, siteId ).length > 0;
}; But no success with that, even after querying Publicize connections. Any ideas, or should I commit what I've got so far (albeit in a broken state)? |
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.
Thanks @Aurorum 💖
I'm not that familiar with guided tours but I think this is a good chunk to get in as is. We can also set this up so we can test this with the experimental layout flag that we added in #41145 to make this a little easier to iterate on. |
) } | ||
<div className="tasks__timing"> | ||
<Gridicon icon="time" size={ 18 } /> | ||
<p>{ translate( '3 minutes' ) }</p> |
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.
Could we please not hardcode values into translatable strings? This should be
translate( '%d minute', '%d minutes', { count: 3, arguments: [ 3 ] } )
like it's done in all the other places where we already do this, for example here: https://github.com/Automattic/wp-calypso/blob/master/client/my-sites/customer-home/cards/tasks/checklist-site-setup/wpcom-checklist/component.jsx#L263
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.
Oops, thank you! I opened #41271 to address that. :)
Changes proposed in this Pull Request
This creates a section for Recommended Tasks, and establishes the first one: "Connect social media accounts". I should note that I've tried to ensure that other tasks can easily be added within the same file though.
Testing instructions
Firstly, verify that this only displays if the site has no Publicize connections and when the checklist is hidden. The skip button should also dismiss the task, but not the card - other tasks should still appear. It'd probably be easier to demonstrate this with another task, but there's only one for now.
When clicking the primary button, you should be redirected to Marketing. A Guided Tour should appear if you're on a desktop device.
Issues:
Part of #40734