-
Notifications
You must be signed in to change notification settings - Fork 69
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 correct inquiry docs link to active dispute/inquiry notice in transactions screen #7277
Add correct inquiry docs link to active dispute/inquiry notice in transactions screen #7277
Conversation
+ rename dispute reason variable for clarity
Test the buildOption 1. Jetpack Beta
Option 2. Jurassic Ninja - available for logged-in A12s🚀 Launch a JN site with this branch 🚀 ℹ️ Install this Tampermonkey script to get more options. Build info:
Note: the build is updated when a new commit is pushed to this PR. |
Size Change: +10 B (0%) Total Size: 1.42 MB
ℹ️ View Unchanged
|
@@ -70,7 +70,7 @@ const DisputeAwaitingResponseDetails: React.FC< Props > = ( { | |||
<CardBody className="transaction-details-dispute-details-body"> | |||
<DisputeNotice | |||
dispute={ dispute } | |||
urgent={ countdownDays <= 2 } | |||
isUrgent={ countdownDays <= 2 } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've renamed this to isUrgent so it's super obvious it's a boolean. I'm not sure if we have a relevant guideline but this is common in WP code (is my understanding).
I saw isDismissible
in block editor JS guidelines so this seems aligned with convention.
let noticeText = __( | ||
'<strong>%s</strong> Challenge the dispute if you believe the claim is invalid, ' + | ||
'or accept to forfeit the funds and pay the dispute fee. ' + | ||
'Non-response will result in an automatic loss. <a>Learn more about responding to disputes</a>', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Split these over multiple lines so we don't need to eslint-disable-next-line-max-len
. Also for readability.
'https://woocommerce.com/document/woopayments/fraud-and-disputes/managing-disputes/#responding'; | ||
|
||
if ( isInquiry( dispute ) ) { | ||
/* translators: <a> link to dispute inquiry documentation. %s is the clients claim for the dispute, eg "The cardholder claims this is an unrecognized charge." */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This block overrides the string + url for inquiries. Hopefully makes this easier to read/understand – default is dispute, details are overridden for inquiries.
} ) => { | ||
const clientClaim = | ||
const shopperDisputeReason = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed this, claim
is less clear than dispute reason
IMO. The claim is part of the reason, and we're displaying it in the UI as a reason as much as a "claim". We use reason more often so hopefully this is clearer.
…n-transaction-detail
Note mobile is a little tight – boxes within boxes. We've discussed options with @nikkivias – this might be a follow up. Edit: related issue below, though it's just for minor adjustments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This tests well @haszari 🙌.
I've confirmed that the links render with the external link icon and on click open the relevant documentation page in a new tab/window for both Disputes (needs_response
) and Inquiries (warning_needs_response
).
I've left some minor non-blocking suggestions/comments.
Note: I hope you don't mind, I removed an unused isAwaitingResponse
import in commit af3d03a – although this wasn't introduced in this PR: see #7231.
Significance: patch | ||
Type: fix | ||
|
||
Update documentation links (new/changed docs content) when notifying merchant that a dispute needs response. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be a "comment" changelog entry since it's behind a feature flag and not visible to users?
Update documentation links (new/changed docs content) when notifying merchant that a dispute needs response. | |
Comment: Behind a feature flag: Update documentation links (new/changed docs content) when notifying merchant that a dispute needs response. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point 😄 7dc77b0
…n-transaction-detail
Co-authored-by: Eric Jinks <[email protected]>
Merging. The failed check is a WooCommerce compatibility check, and it's failing because the environment PHP version is too old (needs to be updated).
|
Fixes #7241
Changes proposed in this Pull Request
This PR updates the docs links in the "you have a dispute you need to respond to" notice displayed in the transaction detail screen.
There are two links, one for disputes and one for inquiries (aka pre-dispute inquiries).
This PR also adds the "external link" icon since these docs are not in a modal/popup or hosted on merhant's store. This also gives a clue that they will open in a new tab/window, which can be confusing (especially on mobile).
And some refactoring
I've done some light refactoring to clarify the code while here. Will add inline review comments to explain. Happy to revert if this is disruptive.
Testing instructions
Dashboard > Transactions
and click on the relevant transaction row to view details.Example screenshots:
npm run changelog
to add a changelog file, choosepatch
to leave it empty if the change is not significant. You can add multiple changelog files in one PR by running this command a few times.Post merge