Skip to content

feat: add React faceted search sample - #6480

Open
vystartasv wants to merge 3 commits into
pnp:mainfrom
vystartasv:feat/react-faceted-search
Open

feat: add React faceted search sample#6480
vystartasv wants to merge 3 commits into
pnp:mainfrom
vystartasv:feat/react-faceted-search

Conversation

@vystartasv

Copy link
Copy Markdown
Contributor

Description

Adds a React faceted search web part using the read-only SharePoint Search REST API. Users can search the current site, inspect bounded results, and filter them with returned FileType and ContentClass refiners.

What changed

  • Added SharePoint Search REST query construction with encoded parameters.
  • Added bounded query, paging, refiner, and control-character validation.
  • Added safe HTTP result-link handling.
  • Added accessible Fluent UI search, filters, result cards, loading, empty, error, and retry states.
  • Added dependency-free response mapping and error-classification tests.
  • Added README and valid gallery metadata.

How was this tested?

  • npm ci
  • npm test -- --clean — 4/4 tests passed.
  • npm run build — TypeScript, Sass, webpack, and lint phase passed.
  • npm run package-solution — production .sppkg package generated and validated.
  • Removed generated dependencies and build artifacts before commit.

Tenant validation requested

Please validate the SharePoint Search REST behavior in a SharePoint Online tenant and add a real screenshot if possible. Search indexing, result properties, refiners, permissions, and responsive behavior need tenant confirmation.

Type of change

  • New sample
  • Tests included
  • Documentation included
  • No fabricated tenant screenshots

@vystartasv

Copy link
Copy Markdown
Contributor Author

Could someone with SharePoint Online access please validate this sample in a real tenant and add a representative screenshot to assets/ or this PR if possible?

Please check search indexing/results, FileType and ContentClass refiners, permissions, empty/error/retry states, and narrow web-part widths. The implementation is read-only and uses SharePoint Search REST only. Local tests, TypeScript, webpack, lint, and production packaging pass. Thank you for any positive or negative findings!

@github-actions

Copy link
Copy Markdown
Contributor

Validation failed!

File: samples/react-faceted-search/assets/sample.json

  • Missing 'name' property!
  • Missing 'source' property!
  • Missing 'title' property!
  • Missing 'shortDescription' property!
  • Missing 'url' property!
  • Missing 'creationDateTime' property!
  • Missing 'updateDateTime' property!
  • Missing 'products' property!
  • Missing 'thumbnails' property!

@github-actions

Copy link
Copy Markdown
Contributor

Sample PR validation for #6480

⚠️ Validation status: warnings

We automatically validate all pull requests against our contribution guidance to ensure that all samples provide a consistent experience to our community.

In order to merge this PR in a timely manner, the following criteria must be met:

Validation Status
Pull request affects only one folder ✅ Succeeded
Sample folder name follows naming convention ✅ Succeeded
README.md contains visitor stat image ⚠️ Warning
Sample requires a .nvmrc file ✅ Succeeded
Sample requires a README.md ✅ Succeeded
Sample requires a screenshot .png in assets folder ⚠️ Warning
No .sppkg file ✅ Succeeded
No node_modules folder ✅ Succeeded
No lib folder ✅ Succeeded
No upgrade reports ✅ Succeeded

@vystartasv please address the above issues and push new changes to this branch.
For more information, see the contribution guidance.

@github-actions

Copy link
Copy Markdown
Contributor

Sample PR validation for #6480

⚠️ Validation status: warnings

We automatically validate all pull requests against our contribution guidance to ensure that all samples provide a consistent experience to our community.

In order to merge this PR in a timely manner, the following criteria must be met:

Validation Status
Pull request affects only one folder ✅ Succeeded
Sample folder name follows naming convention ✅ Succeeded
README.md contains visitor stat image ⚠️ Warning
Sample requires a .nvmrc file ✅ Succeeded
Sample requires a README.md ✅ Succeeded
Sample requires a screenshot .png in assets folder ⚠️ Warning
No .sppkg file ✅ Succeeded
No node_modules folder ✅ Succeeded
No lib folder ✅ Succeeded
No upgrade reports ✅ Succeeded

@vystartasv please address the above issues and push new changes to this branch.
For more information, see the contribution guidance.

@github-actions

Copy link
Copy Markdown
Contributor

Sample PR validation for #6480

⚠️ Validation status: warnings

We automatically validate all pull requests against our contribution guidance to ensure that all samples provide a consistent experience to our community.

In order to merge this PR in a timely manner, the following criteria must be met:

Validation Status
Pull request affects only one folder ✅ Succeeded
Sample folder name follows naming convention ✅ Succeeded
README.md contains visitor stat image ✅ Succeeded
Sample requires a .nvmrc file ✅ Succeeded
Sample requires a README.md ✅ Succeeded
Sample requires a screenshot .png in assets folder ⚠️ Warning
No .sppkg file ✅ Succeeded
No node_modules folder ✅ Succeeded
No lib folder ✅ Succeeded
No upgrade reports ✅ Succeeded

@vystartasv please address the above issues and push new changes to this branch.
For more information, see the contribution guidance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant