You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[v4] Remove PnPjs dependency while retaining DynamicForm and taxonomy controls - #2171
Removes PnPjs from the controls library and controls-tests app, replacing SDK calls with direct SharePoint requests through SPFx HTTP clients. No controls are removed; DynamicForm and both taxonomy picker modes remain available.
Intended target branch: v4-dev.
Changes
Add shared REST handling for operation-aware retries, Retry-After, digest acquisition and caching, response normalization, and partial batch failures.
Migrate DynamicForm item operations, user resolution, folders/document sets, and chunked uploads to a focused REST service, retaining ETag handling and upload defaults.
Preserve ModernTaxonomyPicker behavior using the existing SharePoint v2.1 term-store endpoints. Keep classic TaxonomyPicker's existing implementation.
Replace remaining PnPjs usage in folder browsing, people search, field utilities, and Carousel; export library-owned response types.
Prevent stale form submissions and taxonomy requests from crossing web/list/item/term-set boundaries.
Update dependencies, the Rush lockfile, app examples, control documentation, and the v4 migration guide. Add regression coverage for retries, uploads, partial persistence, public contracts, and lifecycle changes.
Breaking changes
DynamicForm.onSubmitted now receives saved item data and an optional IDynamicFormItemReference instead of a live PnPjs IItem.
Rename returnListItemInstanceOnSubmit to returnListItemReferenceOnSubmit. It still defaults to true.
Import taxonomy and other exposed REST types from the controls library rather than PnPjs. Consumers can continue using their own PnPjs installation independently.
Bundle impact
Controlled gzip measurements decreased from 141,063 to 102,328 bytes for DynamicForm, 23,829 to 7,805 bytes for PeoplePicker, and 19,153 to 11,567 bytes for ModernTaxonomyPicker. Non-PnPjs dependencies and styles were externalized equally; these are not complete SPFx application download sizes.
Remaining compatibility gate
Live SharePoint verification is still required for taxonomy endpoints and write/upload flows. The retained undocumented taxonomy APIs have no public stability guarantee. No authorized test tenant was available, so this PR does not claim verified live feature parity.
PnP telemetry is separate from PnPjs and remains unchanged.
Guidance
You can delete this section when you are submitting the pull request.
Please update this PR information accordingly. We'll use this as part of our release notes in monthly communications.
…rols
Replace SDK calls with SPFx REST services, preserve retry and upload behavior, migrate public contracts, and update tests and documentation.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Removes PnPjs from the v4 controls library while retaining DynamicForm, taxonomy, people, folder, and carousel functionality through SPFx REST clients.
Changes:
Adds shared REST, retry, digest, batching, and persistence services.
Migrates affected controls and introduces SDK-independent public contracts.
Updates dependencies, documentation, examples, and regression tests.
Lock submissions before validation, isolate asynchronous form loads, share the taxonomy tree callback contract, and normalize people picker IDs. Add regression tests and migration guidance.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Address PR review by replacing matchAll with RegExp.exec and retaining submitted values for document upload failures. Add emitted-runtime and callback regressions.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Re-throwing here leaves the tree permanently loading after a failed initial, expansion, or “load more” request. TaxonomyTree adds the group key to groupsLoading, but all three rejection handlers are no-ops and only the success paths remove it, so the new visible error is accompanied by a spinner that never clears and no retry link. Update those rejection paths to clear the loading key (and group.data.isLoading) while preserving hasMoreData for retry.
Clear target-bound form state before reloading, handle empty folder creation responses, and restore retryable taxonomy loading state while preserving descendant restrictions. Add regression coverage and documentation.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
errorMessage is only cleared when the target changes, so a transient search/tree/path failure remains displayed after a successful retry on the same term set. Track the failing operation and clear its error when that operation subsequently succeeds; otherwise the picker continues to report a failure while showing successfully loaded data.
Wrap submission callback failures with saved item identity and phase information. Track taxonomy errors by operation so successful retries clear only the recovered failure. Add regression coverage and migration guidance.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The declared return type excludes a value that this method explicitly returns on the next line. Consumers compiled with strict null checks can therefore dereference the result even when Guid.empty produced undefined; this also narrows the previous public contract without documenting it. Keep undefined in the return type.
Preserve request identity and input order across reordered batch responses and retries. Reject ambiguous response IDs, expose undefined taxonomy results, and add regression coverage and documentation.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preserve IsShareByEmailGuestUser from the previous PnPjs user type, with public contract regression coverage and migration guidance.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's in this Pull Request?
Removes PnPjs from the controls library and controls-tests app, replacing SDK calls with direct SharePoint requests through SPFx HTTP clients. No controls are removed; DynamicForm and both taxonomy picker modes remain available.
Intended target branch:
v4-dev.Changes
Breaking changes
DynamicForm.onSubmittednow receives saved item data and an optionalIDynamicFormItemReferenceinstead of a live PnPjsIItem.returnListItemInstanceOnSubmittoreturnListItemReferenceOnSubmit. It still defaults totrue.Bundle impact
Controlled gzip measurements decreased from 141,063 to 102,328 bytes for DynamicForm, 23,829 to 7,805 bytes for PeoplePicker, and 19,153 to 11,567 bytes for ModernTaxonomyPicker. Non-PnPjs dependencies and styles were externalized equally; these are not complete SPFx application download sizes.
Remaining compatibility gate
Live SharePoint verification is still required for taxonomy endpoints and write/upload flows. The retained undocumented taxonomy APIs have no public stability guarantee. No authorized test tenant was available, so this PR does not claim verified live feature parity.
PnP telemetry is separate from PnPjs and remains unchanged.
Guidance