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

Add/republicize preview #12753

Merged
merged 3 commits into from
Apr 3, 2017
Merged

Add/republicize preview #12753

merged 3 commits into from
Apr 3, 2017

Conversation

jhnstn
Copy link
Member

@jhnstn jhnstn commented Apr 3, 2017

This adds a preview modal to publicize and updates share action button styles.

Action buttons

breakpoint > 480px
screen shot 2017-04-03 at 1 41 57 pm

breakpoint < 480px
action-buttons

Modal
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

  • build with ENABLE_FEATURES=publicize/preview make run
  • 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

@matticbot matticbot added the [Size] L Large sized issue label Apr 3, 2017
@jhnstn jhnstn requested review from gwwar and retrofox April 3, 2017 20:33
@jhnstn jhnstn added Components [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Apr 3, 2017
@jhnstn jhnstn force-pushed the add/republicize-preview branch from aae24a6 to 77d8d8f Compare April 3, 2017 20:41
<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.

Copying over notes from the other PR:

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.)

Copy link
Contributor

Choose a reason for hiding this comment

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

yup, it's a good idea. I think we should move this component into its folder straight in this PR.

Copy link
Contributor

@gwwar gwwar Apr 3, 2017

Choose a reason for hiding this comment

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

I don't mind waiting for a follow up PR to do this change though

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll land this now and do the follow up extraction in another PR.

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.

Tested this enabled/disabled 👍 Let's 🚢 this for now. Do you mind following up on making the modal a generic component in another PR after this lands?

@retrofox
Copy link
Contributor

retrofox commented Apr 3, 2017

Looks pretty good Jason.

I wonder if we should consider the case when the user has one more account of the same media.
In the screenshot above I have two twitter accounts. I think it could/should be defined after this implementation.

@gwwar
Copy link
Contributor

gwwar commented Apr 3, 2017

I wonder if we should consider the case when the user has one more account of the same media.

For a first pass I think taking the first enabled account works.

@jhnstn jhnstn merged commit 05981c2 into master Apr 3, 2017
@jhnstn jhnstn deleted the add/republicize-preview branch April 3, 2017 23:03
@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
Components [Size] L Large sized issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants