Skip to content
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

Checklists: Clean up and organize #26554

Merged
merged 9 commits into from
Aug 16, 2018
Merged

Conversation

sirreal
Copy link
Member

@sirreal sirreal commented Aug 8, 2018

Description

This is a set of changes to make some Checklist components easier to work with and simpler to reason about.

ChecklistShowShare

connect to recordTracksEvent internally rather than expect to receive as passed prop. Updated where used.

ChecklistMain

Reduce indirection by replacing render methods that contain low-complexity conditional logic with inline JSX.

Sort imports.

Simplify connect.

Replace find that checks whether some element of an array is true for a predicate with canonical some.

Testing

No functional changes. Verify that:

  • Completed checklist sharing continues to fire tracks event:
     localStorage.debug = 'calypso:analytics:tracks'
    Click share button on completed WPCOM checklist or banner (/checklist or /stats). Look for calypso_checklist_completed_site_share events.
  • WPCOM Checklists as /checklist continue to render and behave as in production.

@matticbot
Copy link
Contributor

@sirreal sirreal force-pushed the update/checklist-organization branch from cbc9ee0 to 3eb2cf6 Compare August 14, 2018 13:17
@sirreal sirreal added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. and removed [Status] In Progress labels Aug 14, 2018
@sirreal sirreal requested a review from a team August 14, 2018 13:44
@sirreal sirreal force-pushed the update/checklist-organization branch from 0f8ee3d to 8d3dca6 Compare August 14, 2018 14:05

Verified

This commit was signed with the committer’s verified signature.
sirreal Jon Surrell

Verified

This commit was signed with the committer’s verified signature.
sirreal Jon Surrell

Verified

This commit was signed with the committer’s verified signature.
sirreal Jon Surrell

Verified

This commit was signed with the committer’s verified signature.
sirreal Jon Surrell

Verified

This commit was signed with the committer’s verified signature.
sirreal Jon Surrell

Verified

This commit was signed with the committer’s verified signature.
sirreal Jon Surrell

Verified

This commit was signed with the committer’s verified signature.
sirreal Jon Surrell

Verified

This commit was signed with the committer’s verified signature.
sirreal Jon Surrell

Verified

This commit was signed with the committer’s verified signature.
sirreal Jon Surrell
@sirreal sirreal force-pushed the update/checklist-organization branch from 8d3dca6 to e40788f Compare August 14, 2018 16:27
@sirreal sirreal added [Status] In Progress and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Aug 14, 2018
@sirreal
Copy link
Member Author

sirreal commented Aug 14, 2018

Marked as in progress. I'll remove the mergeObjectIntoArrayById usage in ChecklistMain. After #26618 lands, the util can be removed.

@sirreal
Copy link
Member Author

sirreal commented Aug 14, 2018

Marked as in progress. I'll remove the mergeObjectIntoArrayById usage in ChecklistMain. After #26618 lands, the util can be removed.

Cancel that. It will be much simpler to land both, then work more on component organization that will allow that particular util to be removed.

Ready for review.

@sirreal sirreal added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. and removed [Status] In Progress labels Aug 14, 2018
Copy link
Member

@tyxla tyxla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing well, code looks good. Nice cleanup 👍 🚢

@tyxla tyxla removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Aug 16, 2018
@sirreal sirreal merged commit 7ce3113 into master Aug 16, 2018
@sirreal sirreal deleted the update/checklist-organization branch August 16, 2018 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants