pnp / pnp/sp-dev-fx-controls-react

Drop dependency to pageContext where possible?

Open
#667 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted Needs: Discussion 🙋 type:enhancement
Dominant language
TypeScript
Stars
433
Forks
418
Avg merge
5d 6m
Merged PRs (30d)
19

Description

Category

[x] Enhancement

[ ] Bug

[ ] Question

Version

Please specify what version of the library you are using: [any]

Expected / Desired Behavior / Question

A lot/most components require an spfx page context as a prop input. The library would be a lot more useful if you could optionally supply a sp web url instead as this doesn't put a dependency on an spfx solution. In some cases of course this is needed as the component may be utilizing some other components of the spfx project, but a lot of times it seems unncessarry.

The pnpjs sp library does not have this dependency. Neither do the fluent UI controls obviously as they're general fluent UI components. This makes those both librarys highly usable. Most applications I've done in modern sharepoint, I've used a spfx wrapper project for installation and a create-react-app project for business logic as the spfx projects are a pain to develop in. It's just too bad you can't utilize most controls here because of this dependency to the page context.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inventorying the controls in this repository that require an SPFx page context prop, then compare their needs with the alternative of accepting an SP web URL. The issue does not identify specific files or tests, so define the component scope and acceptance criteria before implementation. Done should mean the selected controls can be used without an SPFx solution where their functionality permits it.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.