Skip to content

refactor: sso-provider-table hook architecture#248

Merged
harishsundar-okta merged 16 commits into
mainfrom
refactor/sso-provider-table-hook-architecture
May 21, 2026
Merged

refactor: sso-provider-table hook architecture#248
harishsundar-okta merged 16 commits into
mainfrom
refactor/sso-provider-table-hook-architecture

Conversation

@harishsundar-okta

@harishsundar-okta harishsundar-okta commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Restructures sso-provider-table hooks to follow the single public hook architecture with an internal service layer.

Why

The component was manually wiring two separate hooks (useSsoProviderTable + useSsoProviderTableLogic), leaking internal concerns into the component layer.

What

  • Moved data-fetching/CRUD logic to internal service hook (shared/services/use-sso-provider-table-service.ts)
  • Merged UI logic into public useSsoProviderTable hook; deleted use-sso-provider-table-logic.ts
  • Simplified sso-provider-table.tsx from two hook calls to a single useSsoProviderTable({...}) call
  • Moved ssoProviderQueryKeys to @auth0/universal-components-core (framework-agnostic)
  • Updated types: added UseSsoProviderTableServiceReturn, UseSsoProviderTableOptions; removed UseSsoProviderTableLogicOptions, UseSsoProviderTableLogicResult
  • Split tests: service tests for data/API layer, public hook tests for UI logic

Packages

  • packages/core
  • packages/react

Testing

Please describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. If this library has unit and tests should be added for new functionality and existing tests should complete without errors.

  • image
  • image

Checklist

@github-actions

github-actions Bot commented Apr 8, 2026

Copy link
Copy Markdown

🚀 Preview deployment

Branch: refs/pull/248/merge
Commit: 1ad2245

📝 Preview URL: https://auth0-universal-components-7cl2f6quv-ui-components-217de888.vercel.app


Updated at 2026-04-17T07:54:00.093Z

@codecov-commenter

codecov-commenter commented Apr 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.02618% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.47%. Comparing base (2b5a5e2) to head (5f05f06).
⚠️ Report is 37 commits behind head on main.

Files with missing lines Patch % Lines
.../shared/services/use-sso-provider-table-service.ts 93.82% 10 Missing ⚠️
...rc/hooks/my-organization/use-sso-provider-table.ts 94.15% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #248      +/-   ##
==========================================
+ Coverage   89.41%   89.47%   +0.05%     
==========================================
  Files         159      156       -3     
  Lines       13334    13070     -264     
  Branches     1828     1805      -23     
==========================================
- Hits        11923    11694     -229     
+ Misses       1411     1376      -35     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…nto refactor/sso-provider-table-hook-architecture
@harishsundar-okta
harishsundar-okta marked this pull request as ready for review April 15, 2026 11:57
@harishsundar-okta
harishsundar-okta force-pushed the refactor/sso-provider-table-hook-architecture branch from 66b6fda to ed1450d Compare April 17, 2026 06:43
Comment thread packages/react/src/components/auth0/my-organization/sso-provider-table.tsx Outdated
Comment thread packages/react/src/components/auth0/my-organization/sso-provider-table.tsx Outdated
Comment thread docs-site/public/r/sso-provider-table.json
Comment thread packages/react/src/hooks/my-organization/use-sso-provider-table.ts Outdated
@NaveenChand755

Copy link
Copy Markdown
Contributor

Why packages/react/src/hooks/my-organization/shared ?

@harishsundar-okta harishsundar-okta added refactor Restructuring existing code and logic to reduce technical debt and improve quality Gen AI Indicates that the most of the code in this PR were generated or assisted by generative AI tools. labels Apr 17, 2026
rax7389
rax7389 previously approved these changes Apr 18, 2026
@harishsundar-okta
harishsundar-okta merged commit eaf02f9 into main May 21, 2026
6 checks passed
@harishsundar-okta
harishsundar-okta deleted the refactor/sso-provider-table-hook-architecture branch May 21, 2026 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Gen AI Indicates that the most of the code in this PR were generated or assisted by generative AI tools. refactor Restructuring existing code and logic to reduce technical debt and improve quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants