Skip to content

refactor: move data-table hooks/contexts/provider from features to web modules#27833

Merged
hbjORbj merged 5 commits intomainfrom
devin/1770716727-move-data-table-hooks-to-web
Feb 12, 2026
Merged

refactor: move data-table hooks/contexts/provider from features to web modules#27833
hbjORbj merged 5 commits intomainfrom
devin/1770716727-move-data-table-hooks-to-web

Conversation

@eunjae-lee
Copy link
Contributor

@eunjae-lee eunjae-lee commented Feb 10, 2026

What does this PR do?

Moves client-side data-table code (React hooks, contexts, DataTableProvider) from packages/features/data-table/ to apps/web/modules/data-table/, per the vertical slice architecture rule that packages/features should only contain framework-agnostic code.

Recreates the work from the closed #27228, rebased on top of the recent data-table refactors.

Moved to apps/web/modules/data-table/:

  • hooks/ (12 files) — all React hooks (useDataTable, useColumnFilters, useFilterValue, etc.)
  • contexts/ (4 files) — DataTableFiltersContext, DataTableSegmentContext, DataTableStateContext
  • DataTableProvider.tsx

Stays in packages/features/data-table/:

  • lib/ — types, utils, serializers, parsers, dateRange
  • repositories/ — filterSegment data access
  • __tests__/, GUIDE.md
  • index.ts — trimmed to only re-export lib/types, lib/utils, lib/serializers, lib/separator

Import updates (~40 consumer files):

  • Types/utils (ColumnFilterType, ZFilterValue, convertFacetedValuesToMap, etc.) continue importing from @calcom/features/data-table
  • Hooks/contexts/provider now import from ~/data-table/... paths

GUIDE.md updates:

  • Updated Quick Start import examples to show the split between @calcom/features/data-table (types/utils) and ~/data-table/... (hooks/provider/components)
  • Fixed file path references that pointed to old packages/features/ locations
  • Updated closing section to list both source locations

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. N/A — GUIDE.md within the package was updated to reflect new import paths.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works. N/A — refactor only, existing tests cover functionality.

How should this be tested?

  1. Run yarn type-check:ci --force — should pass (pre-existing embed-react errors are unrelated)
  2. Run yarn lint — should pass with only pre-existing warnings
  3. Verify data tables render correctly in:
    • Bookings page
    • Insights pages
    • User list tables
    • Out of office entries

Checklist

  • My code follows the style guidelines of this project
  • I haven't checked if my changes generate no new warnings

Human Review Checklist

  • Verify the ActiveFiltersValidator type import in useActiveFiltersValidator.ts — it now imports from ~/data-table/DataTableProvider instead of the barrel @calcom/features/data-table, since this type was defined in the contexts that moved
  • Verify no consumers in packages/ were missed that import hooks/contexts from the old barrel export (CI type-check passed, but worth a quick scan)
  • Verify GUIDE.md import examples accurately reflect the new split

Link to Devin run: https://app.devin.ai/sessions/8fe2052a192d4b44ace0377b0b97d772
Requested by: @eunjae-lee

…b modules

Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

devin-ai-integration bot and others added 2 commits February 10, 2026 10:14
Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
@eunjae-lee eunjae-lee marked this pull request as ready for review February 10, 2026 10:23
@eunjae-lee eunjae-lee requested a review from hbjORbj February 10, 2026 10:23
@graphite-app graphite-app bot requested a review from a team February 10, 2026 10:23
@graphite-app graphite-app bot added the core area: core, team members only label Feb 10, 2026
@graphite-app graphite-app bot requested a review from a team February 10, 2026 10:23
@github-actions
Copy link
Contributor

Devin AI is resolving merge conflicts

This PR has merge conflicts with the main branch. A Devin session has been created to automatically resolve them.

View Devin Session

Devin will:

  1. Merge the latest main into this branch
  2. Resolve any conflicts intelligently
  3. Run lint/type checks to ensure validity
  4. Push the resolved changes

If you prefer to resolve conflicts manually, you can close the Devin session and handle it yourself.

@devin-ai-integration
Copy link
Contributor

Merge conflicts with main have been resolved and pushed. All 7 conflicting files were import-only conflicts where the PR's moved imports (~/data-table/...) needed to be reconciled with main's formatting changes. The resolution preserves the PR's intent (hooks/contexts/provider imported from ~/data-table/...) while adopting main's multi-line import formatting.

  • Type check passes (only pre-existing embed-react errors)
  • Lint passes (only pre-existing warnings)
  • Merge commit file count: 63 (matches original PR)

Note: Unable to remove the devin-conflict-resolution label automatically due to API auth limitations — please remove it manually.

@github-actions
Copy link
Contributor

E2E results are ready!

Copy link
Contributor

@hbjORbj hbjORbj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks Eunjae!

@hbjORbj hbjORbj merged commit 1368ffe into main Feb 12, 2026
52 of 53 checks passed
@hbjORbj hbjORbj deleted the devin/1770716727-move-data-table-hooks-to-web branch February 12, 2026 15:00
eunjae-lee added a commit that referenced this pull request Feb 12, 2026
The data-table hooks (useDataTable, useFilterValue) were moved from
@calcom/features/data-table to ~/data-table/hooks/ in #27833 but this
file was missed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
eunjae-lee added a commit that referenced this pull request Feb 12, 2026
Another import missed in #27833 refactor — DataTableProvider moved from
@calcom/features/data-table/ to ~/data-table/.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
sean-brydon pushed a commit that referenced this pull request Feb 12, 2026
* fix: update data-table hook imports after refactor (#27833)

The data-table hooks (useDataTable, useFilterValue) were moved from
@calcom/features/data-table to ~/data-table/hooks/ in #27833 but this
file was missed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: update DataTableProvider import path in insights-wrong-routing-view

Another import missed in #27833 refactor — DataTableProvider moved from
@calcom/features/data-table/ to ~/data-table/.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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.

2 participants