pnp / pnp/sp-dev-fx-controls-react
Drop dependency to pageContext where possible?
Nobody has claimed this yet.
- 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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