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

Publicize: add sharing preview modal #12679

Closed

Conversation

jhnstn
Copy link
Member

@jhnstn jhnstn commented Mar 30, 2017

This adds a preview modal to publicize:

breakpoint > 660px

screen shot 2017-03-30 at 1 28 36 pm

breakpoint < 660px

screen shot 2017-03-30 at 1 29 05 pm

Note
At the moment we only have previews for Facebook and Twitter. #12644 adds the remaining available services.

Testing

  • Open sharing option on a post from http://calypso.localhost:3000/posts/my/:site
  • Edit customized message
  • Click "Preview"
  • The preview modal should open
  • The preview should show the customized message
  • Click the close modal button ( top left X )
  • The preview modal should close

@matticbot
Copy link
Contributor

@jhnstn jhnstn requested review from retrofox, iamtakashi and gwwar March 30, 2017 20:41
@jhnstn jhnstn added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Mar 30, 2017
@jhnstn jhnstn force-pushed the add/publicize-preview-modal branch from c64d495 to d8ff123 Compare March 30, 2017 21:39
@matticbot matticbot added the [Size] M Medium sized issue label Mar 30, 2017
@matticbot matticbot added [Size] L Large sized issue and removed [Size] M Medium sized issue labels Mar 30, 2017
Copy link
Contributor

@gwwar gwwar left a comment

Choose a reason for hiding this comment

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

Thanks @jhnstn changes here look good and test well

<Gridicon icon="cross" />
</button>
</header>
<SharingPreviewPane { ...previewProps } />
Copy link
Contributor

Choose a reason for hiding this comment

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

This is optional, but if we're concerned with pass through props, perhaps:

{ children }

So in the caller this looks like:

<SharingPreviewModal isVisible={ isVisible } onClose={ onClose }>
    <SharingPreviewPane siteId={ siteId } postId={ postId } message={ message } />
</SharingPreviewModal>

Copy link
Contributor

Choose a reason for hiding this comment

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

If we pull out the sharing specific props, this component becomes reusable if we need a dialog that looks like a web preview. (We'd need to change class names though and move this into the component folder.)

@retrofox retrofox force-pushed the add/publicize-scheduling-pre-release branch from 125acee to d06d942 Compare April 3, 2017 12:44
@matticbot
Copy link
Contributor

@jhnstn This PR needs a rebase

@retrofox retrofox force-pushed the add/publicize-scheduling-pre-release branch from d06d942 to fcd4b59 Compare April 3, 2017 20:14
@jhnstn
Copy link
Member Author

jhnstn commented Apr 3, 2017

closing in favor of #12753

@jhnstn jhnstn closed this Apr 3, 2017
@jhnstn jhnstn deleted the add/publicize-preview-modal branch April 3, 2017 20:34
@matticbot matticbot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Apr 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants