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

Widgets: Adds Simple Payment Buttons as Widgets #9782

Merged
merged 11 commits into from
Jun 26, 2018

Conversation

rodrigoi
Copy link
Contributor

@rodrigoi rodrigoi commented Jun 15, 2018

Original Feature Branch: #9577

Since this is a Feature branch, it fixes a lot of things:

Depends on:

Changes proposed in this Pull Request:

Adds support on the Customizer to add Simple Payment Buttons as Sidebar Widgets.

Widget List Widget Customizer Form & Preview
screen shot 2018-05-18 at 12 14 37 screen shot 2018-05-18 at 12 15 34

Also, the user can manage their Simple Payment Buttons from the Customizer with a collapsible form

Cosed Open
screen shot 2018-06-06 at 15 10 32 screen shot 2018-06-06 at 15 11 15
Add New Edit Delete
my movie 1 mp4 edit delete

The form uses the same defaults and validations used on Calypso

Post/Page Form Customizer Form
screen shot 2018-06-07 at 01 28 33 screen shot 2018-06-18 at 17 56 23

Testing instructions:

Pre-requisites:

  • apply this branch on a Jetpack site with an active Business Plan subscription and a Theme with at least one widget area
  • to create one or more Payment Buttons on the Post/Page editor

then you'll need to:

  • open the Customizer on your sandboxed Business Site
  • go to Widgets and select a Widget Area
  • click on Add Widget
  • search on the widget panel for Simple Payment
  • select the Simple Payment widget

The Simple Payment Customizer should list the available Payment Buttons, and the Customizer Preview should show the item selected by default. All changes should update live on the preview window and the site should only be updated upon publishing.

To create a new product, you'll need to:

  • click on Add New
  • fill the form. Using an image is optional, but it should open the media library if clicked.

The widget preview on the customizer should clear out, and display the entered values as they are typed on the form.

  • click Save

the form should close, and the new SP button should be added to the drop down list. The customizer preview should show the new SP button.

  • click Cancel

the form should clear and close, and the previously selected SP button should appear on the customizer preview.

To edit and existing product, you'll need to:

  • Select the desired product from the drop down list
  • click on Edit Selected

The form should load the product properties, and the widget preview on the customizer should show the correct product, and update the values as they are edited on the form.

  • click Save

the form should close, preserving the changes on the customizer preview window and the selected item on the product drop down list.

  • click Cancel

the form should clear and close, and the previously selected SP button should appear on the customizer preview.

To delete an existing product, you'll need to:

  • Select the desired product from the drop down list.
  • click on Edit Selected

The form should load the product properties, and the widget preview on the customizer should show the correct product.

  • click Delete

After confirming the action, the selected product should disappear from the product drop down list. The first product on the list should be selected, and the customizer preview should reflect this change.

Known Issues and pending items:

Proposed changelog entry for your changes:

  • Fixes an error when the user has published Simple Payment Products but the Professional Subscription has expired.
  • Adds Simple Payment Products as Widgets, with the option to manage them via the Customizer.

@rodrigoi rodrigoi self-assigned this Jun 15, 2018
@rodrigoi rodrigoi requested a review from a team as a code owner June 15, 2018 21:09
@rodrigoi rodrigoi force-pushed the add/simple-payments-widget branch from 8ce126f to 1967e37 Compare June 18, 2018 02:37
@rodrigoi rodrigoi added this to the 6.3 milestone Jun 18, 2018
@rodrigoi rodrigoi added [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. [Status] Needs Design Review Design has been added. Needs a review! and removed [Status] In Progress labels Jun 18, 2018
@rodrigoi rodrigoi requested a review from a team June 19, 2018 13:40
@rodrigoi rodrigoi force-pushed the add/simple-payments-widget branch 2 times, most recently from 20f0b95 to f9a214c Compare June 22, 2018 18:41
Rodrigo Iloro and others added 3 commits June 26, 2018 11:46
Override the media query and ensure that Simple Payments widgets are always displayed as a single column.
…9673)

In the frontend, only show the widget if the Simple Payments shortcode is parsed successfully.

In the customizer, show the widget regardless, so that it can be modified via the pencil icon.
@rodrigoi rodrigoi force-pushed the add/simple-payments-widget branch from 4e68f7d to bdfe618 Compare June 26, 2018 14:46
Copy link
Contributor

@Copons Copons 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 and I can't seem to break it!
Can't really review the code here, though, but I'd say all the children branches have been tested and reviewed thoroughly already.

@rodrigoi rodrigoi added [Status] Has Changelog [Pri] High and removed DO NOT MERGE don't merge it! [Status] Needs Changelog [Status] Needs Design Review Design has been added. Needs a review! [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Jun 26, 2018
@oskosk oskosk added the [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. label Jun 26, 2018
Copy link
Contributor

@oskosk oskosk left a comment

Choose a reason for hiding this comment

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

I'm merging this one. It was thoroughly crafted in a super tidy way and there was a call for testing in p8oabR-ey-p2.

Thanks for the great work!

@oskosk oskosk added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Jun 26, 2018
@oskosk oskosk merged commit c22f6f9 into master Jun 26, 2018
@ghost ghost removed the [Status] Ready to Merge Go ahead, you can push that green button! label Jun 26, 2018
@oskosk oskosk deleted the add/simple-payments-widget branch June 26, 2018 21:49
oskosk added a commit that referenced this pull request Jun 26, 2018
oskosk added a commit that referenced this pull request Jun 26, 2018
* Set boilerplate for 6.3 in readme.txt

* Add changelog for 6.2.1 to changelog.txt

* Set boilerplate for 6.3 in to-test.md

* Sync Stable tag to 6.2.1

* Add #5647 to changelog

* Add #7956 to changelog

* Add #9138 to changelog

* Add #9573 to changelog

* Add #9728 to changelog

* Add #9732 to changelog

* Add #9752 to changelog

* Add some testing instructions

* Add #9823 to changelog

* Add #9780 to changelog

* Add testing instructions for #9780

* Add #9525 to changelog

* Add #9782 to changelog

* Add #9828 to changelog
@kraftbj
Copy link
Contributor

kraftbj commented Jul 4, 2018

Post-release cleanup in #9863

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.

7 participants