Privacy: Add @since tags and clarify JSDoc in privacy-tools.js - #13842
zakariabinsaifullah wants to merge 1 commit into
Conversation
Follow-up to [63556], which added docblocks for the privacy request helper functions. This addresses the remaining feedback on #49381: - Add `@since` tags: 4.9.6 for the functions introduced with the privacy tools, 5.4.0 for `setExportProgress()` and `setErasureProgress()`. - Mark `zipUrl` and `errorMessage` as optional parameters. - Clarify that the progress functions take the number of completed exporters/erasers (0 to count), while the `doNext*()` functions take a 1-based index. - Add the missing `@return` tag to `onErasureFailure()`. See #49381. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
|
Thanks! This looks good to me. |
Follow-up to r63556, which added docblocks for the privacy request helper functions in
privacy-tools.js. This PR covers the rest of the review feedback left on #6690 (by @masteradhoc, @VladimirAus and @mukeshpanchal27):@sincetags on every function. I checked versions against the release tags. The helpers were introduced in 4.9.6 (inwp-admin/js/xfn.jsat first, moved toprivacy-tools.jsin 5.3).setExportProgress()andsetErasureProgress()were added in 5.4.0. The signatures haven't changed since.zipUrlanderrorMessageare now marked[optional], and the descriptions say what happens when each is omitted.exportersCount/erasersCount).doNextExport()/doNextErasure()receive a 1-based index (the first call isdoNextExport( 1, 1 )). The summaries now say what drives the progress update.onErasureFailure()was missing its@return {void}.Documentation only; no behavior change.
Checks run:
npx eslint,npx wp-scripts lint-js(JSDoc rules),grunt jshint:core,node --check,git diff --check. All pass.Trac ticket: https://core.trac.wordpress.org/ticket/49381
Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Researching
@sinceversions from the release history and drafting the docblock wording. I reviewed the final changes and take responsibility for them.This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.