-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Added "Finish store setup" card to My Home #44547
Conversation
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~303 bytes added 📈 [gzipped])
Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
* @param {number} siteId Site ID | ||
* @returns {object} Object with store setup information | ||
*/ | ||
export default function getStoreSetup( state, siteId ) { |
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.
Please handle any view checks on the server, see PCYsg-qqr-p2 or PCYsg-qpk-p2 for more info. If you have any questions @Automattic/serenity can help walk you through this.
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.
Totally fine though to let the task component query if we need to display remaining tasks left.
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.
Thank you for your comments @gwwar, the documentation you shared is very helpful.
In this case, as you mentioned here, I should add an endpoint in Jetpack to expose the information I need, am I right?
Also, just to confirm, (please correct me if I'm missing something) in this repo I should create a structure similar to what we use with the checklist
, to handle the data we get from Jetpack, yes?
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 should add an endpoint in Jetpack to expose the information I need, am I right?
Correct!
in this repo I should create a structure similar to what we use with the checklist, to handle the data we get from Jetpack, yes?
I'm not sure I follow what's going on there, but I believe it's a checklist for use outside of of My Home, so likely more complicated than you need. I'd say a better model in your case might be the ConnectAccountsTask
component. Your task component would have a query component that fetches the data from your new endpoint, and updates appropriately. So the overall idea is:
- My Home page load calls the
home/layout
endpoint. - Server determines which view to send back; let's say your view in this case.
- The API returns the list of cards to show (which has your
TASK_SITE_SETUP_CHECKLIST_ECOMMERCE
in the main spot). - The page renders your card/task, which triggers the query component to fetch the checklist data you require.
- When that comes back, the task is visually updated as required.
- As a user completes tasks, your checklist data should remain your "single source of truth", so that any fresh page reload of My Home would go through the above again and render the correct completion data.
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.
Thank you @kwight, now I get it 🙂
We also have dev mode for My Home views, explained in PCYsg-qqj-p2 – this makes it easier to force a certain view while you're working (but remember you do need to add the view to your sandbox). At least with this approach, you can be testing the actual branch you'll be merging, rather than a modified substitute. |
👋 Just catching up here. I'm wondering if the "scary" button is too much for this scenario. We typically associate red with "This is very, very broken and needs immediate attention." It could create a sense of panic or alarm in the user. If the primary task card in My Home is "What should I do next?" I would think the regular primary CTA would be enough emphasis without being alarming. What do y'all think? Cc'ing @Automattic/dotcom-manage-design in case they have thoughts. |
@sixhours, I 100% agree with you. Is there a reason we're not using our regular primary button here? |
Thank you @sixhours and @olesyabrk for the advice. Good idea, I will follow the pattern that is already used here and leave that button as primary. /cc: @jameskoster |
Is this still active @octaedro ? |
This commit adds the "Finish store setup" card to My home
This commit changes the component "FinishStoreSetup" name and decouples it from "task.jsx"
This commit adds a query component and the code necessary to handle site-setup-ecommerce store
Given some difficulties we currently have on the wc-admin side to get the params we need, the card was modified to not to use them for now.
920d663
to
8ed683f
Compare
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.
Sure, it's on Serenity's board, we should get to it today 👍 |
Can we not add the link to the Quick Links section? We wanted to keep that tight and generic, with nothing specific to individual tasks (they would pile up and loose effectiveness pretty quickly). cc/ @sixhours if I'm off the mark here. |
const translate = useTranslate(); | ||
|
||
return ( | ||
<Task |
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.
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.
Thank you for the suggestion @kwight, I like the idea but I'm not sure about how much time to show there, since the task list has a few tasks and we're not able to know how many the user needs to finish. If it's only one, they could finish it in a minute or two but if they have all of them undone for sure it will take more time.
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.
We don't aim for accuracy – it's more like "hey, it'll probably take you about 10 minutes if you do it all right now". But certainly up to you if you thinking dropping it is the way to go.
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.
Hi @pmcpinto,
What do you think about the estimated time for the Finish store setup
card?
Is it ok if we add a fixed 7 minutes to this task?
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.
@octaedro 7 min sounds good, as it's the sum of the estimated time of the main tasks (products, shipping, taxes, payments, customize store)
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.
Added the timer prop with 7 minutes
in the commit b8235d4
Good catch! Since this step is featured in the banner/header area, it's very prominent, so adding it to Quick Links creates extra noise. Once someone has finished the store setup, I could see adding a Quick Link to "Add new product" or similar, perhaps. The store setup is a transient step, whereas Quick Links should be stuff that's going to be used again and again. Let me know if that makes sense! |
Thank you for the feedback, it sounds good to me. Just to confirm I will CC @jameskoster |
I tested this with D49062-code, it's looking good to me 🎉 |
This commit removes 'Finish store setup' from quick links
I removed the |
There's https://github.com/Automattic/wp-calypso/tree/master/client/assets/images with images, including the @octaedro at one time, there was a speedometer illustration, is that no longer applicable or usable? |
Hi @kwight, |
This commit adds timing prop to the `Finish store setup` card
I can! I'll sync up with Dan and see how he did those. I'm not sure I'd be able to get to it until next week, though. In the meantime, would one of our existing illustrations from that "family" work? Maybe the Payments coin illustration? https://wordpress.com/calypso/images/earn-section-3e8fbe66663516cbb6bdc5037be7b643.svg |
This commit adds the `earnSection` image to the card
Thank you @sixhours, I added the image you suggested in the commit 7d5b15b and it looks good 🙂 |
Looks great to me: As mentioned by @mmtr , be sure to land this PR first before D49062-code to avoid Calypso errors. |
This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/4425576 Thank you @octaedro for including a screenshot in the description! This is really helpful for our translators. |
Translation for this Pull Request has now been finished. |
Changes proposed in this Pull Request
This PR is part of a bigger change related to the WC-Admin issue 554.
It focuses on only the visual changes.
This PR adds the "Finish store setup" card to
My Home
.9fdeede5d7.png)
Testing instructions
In order to test this PR, these changes should be approved in
Phabricator
first.My Home
, adding the params?dev=true&view=VIEW_SITE_SETUP_ECOMMERCE
to the URL (it will look likehttp://calypso.localhost:3000/home/[my_site]?dev=true&view=VIEW_SITE_SETUP_ECOMMERCE
).Finish store setup
card is visible.Quick link
namedFinish store setup
is visible too.Finish store setup
should be pointing to the site's store.Fixes partially 554