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

Store: Add the ability to reply to product reviews. #18377

Merged
merged 2 commits into from
Sep 29, 2017

Conversation

justinshreve
Copy link
Contributor

This PR adds the ability to reply to product reviews. The UI and behavior here matches normal comments management (see #17047 as well). It also adjusts the reply view to be sorted oldest -> newest like a thread.

screen shot 2017-09-28 at 1 45 28 pm

cropped

Closes #17047. Closes #17046.

To Test:

  • Run npm run test-client client/extensions/woocommerce/state and make sure all tests pass.
  • Go to http://calypso.localhost:3000/store/reviews/:site and find a review.
  • Click into the comment textarea, and it should expand so you can begin typing your reply.
  • Hit submit when you are ready. The reply should show up in the updated list.
  • If you replied to a pending review, it should also be approved.

@justinshreve justinshreve added Store [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Tests] Includes Tests labels Sep 28, 2017
@justinshreve justinshreve self-assigned this Sep 28, 2017
@matticbot
Copy link
Contributor

@allendav
Copy link
Contributor

As mentioned in slack - a little problem with sending, especially multi-line replies

sometimes-send-doesnt-send

const hasCommentText = commentText.trim().length > 0;

// Only show the scrollbar if the textarea content exceeds the max height
const hasScrollbar = textareaHeight === TEXTAREA_MAX_HEIGHT;
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you want exactly equal here, or maybe >= ?

export function announceCreateFailure( { dispatch } ) {
dispatch(
errorNotice(
translate( "Your reply couldn't be posted." ),
Copy link
Contributor

Choose a reason for hiding this comment

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

Usually we do single quoted strings with escaped interior single quotes, no?

Copy link
Contributor

@allendav allendav left a comment

Choose a reason for hiding this comment

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

Probably needs a tweak in send hit box. A couple other suggestions. Tests pass. Pre-approving.

…omparison on text area height, and make the submit box padding a bit wider to make it easier to hit.
@justinshreve justinshreve added [Status] Ready to Merge and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Sep 29, 2017
@justinshreve justinshreve merged commit 7dd54ad into master Sep 29, 2017
@justinshreve justinshreve deleted the add/store-review-reply-create branch September 29, 2017 22:52
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.

3 participants