-
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
Checklist: Untangle server and client list merging #25956
Conversation
d4e8819
to
ec55ef6
Compare
0ddc9cb
to
7e2738c
Compare
Thanks for a21fbd4! I guess we should probably do the same with |
const JetpackChecklist = () => <Checklist />; | ||
|
||
export default connect( ( state, { siteId } ) => ( { | ||
plugins: getPluginsForSite( state, siteId, false ), |
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.
Why is this prop connected? It's not clear to me how it's used here.
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.
Ouch, this whole file shouldn't even be here!
👍 Yep, I think so. Didn't have time and wanted to run it by you first. |
a21fbd4
to
8b1f5b1
Compare
I think this is good to go. I'm writing up the results of some related discussion as an issue and will share soon. Maybe we should get some testing help from other folks as I've gotten my hands dirty here. |
Simpler version of #25924 that retains using arrays for
tasks
(since @sirreal convinced me it's safer to use arrays for ordered lists 😉 ). This also has the benefit of being less invasive.Rationale: We're going to want to insert 'pending' state for individual checklist items for https://github.com/Automattic/wp-calypso/projects/70, so it helps to be able to inject those at
connect()
level. This PR untangles things somewhat to prepare for that.Note that both
onboardingChecklist.js
andjetpack-checklist.js
(yes, we should harmonize filenames, too) had a function duplicated (namedonboardingTasks
andjetpackTasks()
, respectively). At closer look, that function was essentially merging two objects, and sorting them by key according to an array. I've reshuffled that functionality so that it makes more sense now IMO.Testing Instructions
(Copied from #25924 -- relevant bits only)
Verify that the checklist still works, both for WP.com, and JP sites
http://calypso.localhost:3000/checklist/:site
Verify that the
ChecklistBanner
component (in the stats section) still works:(WP.com only)
Apply the following patch below for easier testing
Navigate to
http://calypso.localhost:3000/stats/day/:site
Click the 'Do It' button, and verify that it takes you to the correct destination and starts a Guided Tour.
Click the 'View your checklist' link, and verify that it takes you to the checklist.