Link cart/checkout merchant (editor) feedback prompt to special GitHub issue type (https://github.com/woocommerce/woocommerce-blocks/pull/2976)

* issue template for cart & checkout feedback

* fix example desktop OS (not iOS!)

* delete `withFeedbackPrompt` - not used

* link cart/checkout editor feedback to GitHub issue:
- add new CartCheckoutFeedbackPrompt with specialised text & url
- use in cart/checkout blocks
- tweaked wording of feedback prompt text

* use speech bubble icon to represent feedbackiness

* simplify cart/checkout feedback prompts

* add default labels to all issue templates

* use markdown heading syntax for headings (was basic bold previously)

* tweak wording (remove hint of frustration) and use new "feedback" label
This commit is contained in:
Rua Haszard 2020-08-10 08:18:36 +12:00 committed by GitHub
parent a74ca7ddeb
commit b8137587c3
9 changed files with 54 additions and 73 deletions

View File

@ -1,13 +1,13 @@
---
name: "\U0001F41E Bug report"
about: Let us know if something isn't working as you expect it to.
labels: "type: bug"
---
**Describe the bug**
## Describe the bug
A clear and concise description of what the bug is.
**To Reproduce**
## To reproduce
Steps to reproduce the behavior:
1. Go to '...'
@ -15,14 +15,14 @@ Steps to reproduce the behavior:
3. Scroll down to '....'
4. See error
**Expected behavior**
## Expected behavior
A clear and concise description of what you expected to happen.
**Screenshots**
## Screenshots
If applicable, add screenshots to help explain your problem.
**WordPress (please complete the following information):**
## Enviroment
### WordPress (please complete the following information):
* Core version: [e.g. 5.0.3]
* Gutenberg version (if installed): [e.g. 4.8.0]
* WooCommerce version: [e.g. 3.5.3]
@ -30,18 +30,16 @@ If applicable, add screenshots to help explain your problem.
* Site language:
* Any other plugins installed:
**Desktop (please complete the following information):**
* OS: [e.g. iOS]
### Desktop (please complete the following information):
* OS: [e.g. macOS, Windows]
* Browser [e.g. chrome, safari]
* Version [e.g. 22]
**Smartphone (please complete the following information):**
### Smartphone (please complete the following information):
* Device: [e.g. iPhone6]
* OS: [e.g. iOS8.1]
* Browser [e.g. stock browser, safari]
* Version [e.g. 22]
**Additional context**
## Additional context
Add any other context about the problem here.

View File

@ -0,0 +1,15 @@
---
name: "\U0001F4AC Feedback Cart & Checkout Blocks"
about: Submit feedback about the new block-based Cart & Checkout.
labels: "type: feedback", "◼️ block: cart", "◼️ block: checkout"
---
<!--
Thank you for taking the time to leave your feedback on the Cart and Checkout blocks!
We read every single one of these reports and use them as we plan and consider where we focus
future efforts on improving the blocks.
-->
## What do you like about the Cart & Checkout blocks?
## What do you think is missing from the Cart & Checkout blocks?

View File

@ -2,17 +2,17 @@
name: "✨ Feature request"
about: If you have an idea to improve an existing WooCommerce + Gutenberg related
feature, please let us know or submit a Pull Request!
labels: "type: enhancement"
---
**Is your feature request related to a problem? Please describe.**
## Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
## Describe the solution you'd like
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
## Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
## Additional context
Add any other context or screenshots about the feature request here.

View File

@ -2,12 +2,12 @@
name: "❓ Support Question"
about: If you have a question please see our docs or use our forums, helpdesk, or
Slack Community!
labels: "type: support"
---
We don't offer technical support on GitHub so we recommend using the following:
**Reading our documentation**
## Reading our documentation
Usage docs can be found here: https://docs.woocommerce.com/
If you have a problem, you may want to start with the self help guide here: https://docs.woocommerce.com/document/woocommerce-self-service-guide/
@ -16,7 +16,7 @@ If you have a problem, you may want to start with the self help guide here: http
from a human being - submit a ticket via the helpdesk
https://woocommerce.com/contact-us/
**General usage and development questions**
## General usage and development questions
- WooCommerce Slack Community: https://woocommerce.com/community-slack/
- WordPress.org Forums: https://wordpress.org/support/plugin/woocommerce
- The WooCommerce Help and Share Facebook group

View File

@ -2,7 +2,7 @@
* External dependencies
*/
import { __ } from '@wordpress/i18n';
import FeedbackPrompt from '@woocommerce/block-components/feedback-prompt';
import { CartCheckoutFeedbackPrompt } from '@woocommerce/block-components/feedback-prompt';
import { InspectorControls } from '@wordpress/block-editor';
import {
Disabled,
@ -129,12 +129,7 @@ const BlockSettings = ( { attributes, setAttributes } ) => {
} }
/>
) }
<FeedbackPrompt
text={ __(
'We are currently working on improving our cart and checkout blocks, providing merchants with the tools and customization options they need.',
'woo-gutenberg-products-block'
) }
/>
<CartCheckoutFeedbackPrompt />
</InspectorControls>
);
};

View File

@ -2,7 +2,7 @@
* External dependencies
*/
import { __ } from '@wordpress/i18n';
import FeedbackPrompt from '@woocommerce/block-components/feedback-prompt';
import { CartCheckoutFeedbackPrompt } from '@woocommerce/block-components/feedback-prompt';
import { InspectorControls } from '@wordpress/block-editor';
import {
PanelBody,
@ -263,12 +263,7 @@ const BlockSettings = ( { attributes, setAttributes } ) => {
/>
) }
<FeedbackPrompt
text={ __(
'We are currently working on improving our cart and checkout blocks, providing merchants with the tools and customization options they need.',
'woo-gutenberg-products-block'
) }
/>
<CartCheckoutFeedbackPrompt />
</InspectorControls>
);
};

View File

@ -13,7 +13,10 @@ import './style.scss';
/**
* Component to render a Feedback prompt in the sidebar.
*/
const FeedbackPrompt = ( { text } ) => {
const FeedbackPrompt = ( {
text,
url = 'https://ideas.woocommerce.com/forums/133476-woocommerce?category_id=384565',
} ) => {
return (
<div className="wc-block-feedback-prompt">
<Icon srcElement={ comment } />
@ -22,7 +25,7 @@ const FeedbackPrompt = ( { text } ) => {
</h2>
<p className="wc-block-feedback-prompt__text">{ text }</p>
<a
href="https://ideas.woocommerce.com/forums/133476-woocommerce?category_id=384565"
href={ url }
className="wc-block-feedback-prompt__link"
rel="noreferrer noopener"
target="_blank"
@ -39,6 +42,17 @@ const FeedbackPrompt = ( { text } ) => {
FeedbackPrompt.propTypes = {
text: PropTypes.string,
url: PropTypes.string,
};
export default FeedbackPrompt;
export const CartCheckoutFeedbackPrompt = () => (
<FeedbackPrompt
text={ __(
'We are currently working on improving our cart and checkout blocks to provide merchants with the tools and customization options they need.',
'woo-gutenberg-products-block'
) }
url="https://github.com/woocommerce/woocommerce-gutenberg-products-block/issues/new?template=--cart-checkout-feedback.md"
/>
);

View File

@ -1,7 +1,6 @@
export { default as withAttributes } from './with-attributes';
export { default as withCategories } from './with-categories';
export { default as withCategory } from './with-category';
export { default as withFeedbackPrompt } from './with-feedback-prompt';
export { default as withProduct } from './with-product';
export { default as withProductVariations } from './with-product-variations';
export { default as withSearchedProducts } from './with-searched-products';

View File

@ -1,35 +0,0 @@
/**
* External dependencies
*/
import { Fragment } from '@wordpress/element';
import { InspectorControls } from '@wordpress/block-editor';
import { createHigherOrderComponent } from '@wordpress/compose';
import FeedbackPrompt from '@woocommerce/block-components/feedback-prompt';
/**
* Adds a feedback prompt with custom text to the editor sidebar.
*
* @param {string} content Text to display in the feedback prompt.
*
* @return {Function} Function that returns the wrapped component.
*/
const withFeedbackPrompt = ( content ) =>
/**
* Adds a feedback prompt to the provided component.
*
* @param {WPComponent} BlockEdit Original component.
*
* @return {WPComponent} Wrapped component.
*/
createHigherOrderComponent( ( BlockEdit ) => {
return ( props ) => (
<Fragment>
<InspectorControls>
<FeedbackPrompt text={ content } />
</InspectorControls>
<BlockEdit { ...props } />
</Fragment>
);
}, 'withFeedbackPrompt' );
export default withFeedbackPrompt;