-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
feat: add angular devtools support and fix core devtools reactivity #6248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
riccardoperra
wants to merge
12
commits into
alpha
Choose a base branch
from
feat/angular-devtools
base: alpha
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
179e6d8
feat: add angular devtools
riccardoperra edac796
fix(table-devtools): fix table state reactivity
riccardoperra 0427ee7
Add devtools in all angular examples
riccardoperra 69f0049
Use a stable identifier reference to register devtools in table
riccardoperra bdd89ba
Fix dependency versions
riccardoperra 9eee81f
ci: apply automated fixes
autofix-ci[bot] f74d56b
generate instanceId for react-table
riccardoperra 0833205
Merge branch 'alpha' into feat/angular-devtools
riccardoperra 6384ca8
Merge branch 'alpha' into feat/angular-devtools
KevinVandy 8a240a5
Merge branch 'alpha' into feat/angular-devtools
KevinVandy 403a782
fix basic external store examples
KevinVandy a7e7567
add external atoms example in angular
riccardoperra File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,22 @@ | ||
| import { provideBrowserGlobalErrorListeners } from '@angular/core' | ||
| import { isDevMode, provideBrowserGlobalErrorListeners } from '@angular/core' | ||
| import { provideTanStackDevtools } from '@tanstack/angular-devtools/provider' | ||
| import type { ApplicationConfig } from '@angular/core' | ||
|
|
||
| export const appConfig: ApplicationConfig = { | ||
| providers: [provideBrowserGlobalErrorListeners()], | ||
| providers: [ | ||
| provideBrowserGlobalErrorListeners(), | ||
| isDevMode() | ||
| ? provideTanStackDevtools(() => ({ | ||
| plugins: [ | ||
| { | ||
| name: 'TanStack Table', | ||
| render: () => | ||
| import('@tanstack/angular-table-devtools').then((m) => | ||
| m.TableDevtoolsPanel(), | ||
| ), | ||
| }, | ||
| ], | ||
| })) | ||
| : [], | ||
| ], | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| { | ||
| "$schema": "./node_modules/@angular/cli/lib/config/schema.json", | ||
| "version": 1, | ||
| "cli": { | ||
| "packageManager": "pnpm", | ||
| "analytics": false, | ||
| "cache": { "enabled": false } | ||
| }, | ||
| "newProjectRoot": "projects", | ||
| "projects": { | ||
| "basic-external-atoms": { | ||
| "projectType": "application", | ||
| "root": "", | ||
| "sourceRoot": "src", | ||
| "prefix": "app", | ||
| "architect": { | ||
| "build": { | ||
| "builder": "@angular/build:application", | ||
| "options": { | ||
| "browser": "src/main.ts", | ||
| "tsConfig": "tsconfig.app.json", | ||
| "assets": [], | ||
| "styles": ["src/styles.css"] | ||
| }, | ||
| "configurations": { | ||
| "production": { | ||
| "budgets": [ | ||
| { "type": "initial", "maximumWarning": "500kB", "maximumError": "1MB" }, | ||
| { "type": "anyComponentStyle", "maximumWarning": "4kB", "maximumError": "8kB" } | ||
| ], | ||
| "outputHashing": "all" | ||
| }, | ||
| "development": { "optimization": false, "extractLicenses": false, "sourceMap": true } | ||
| }, | ||
| "defaultConfiguration": "production" | ||
| }, | ||
| "serve": { | ||
| "builder": "@angular/build:dev-server", | ||
| "configurations": { | ||
| "production": { "buildTarget": "basic-external-atoms:build:production" }, | ||
| "development": { "buildTarget": "basic-external-atoms:build:development" } | ||
| }, | ||
| "defaultConfiguration": "development" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| { | ||
| "name": "tanstack-angular-table-example-basic-external-atoms", | ||
| "scripts": { | ||
| "ng": "ng", | ||
| "start": "ng serve --port 5173", | ||
| "dev": "ng serve --port 5173", | ||
| "build": "ng build", | ||
| "lint": "eslint ./src", | ||
| "watch": "ng build --watch --configuration development" | ||
| }, | ||
| "private": true, | ||
| "packageManager": "pnpm@11.1.1", | ||
| "dependencies": { | ||
| "@angular/common": "^21.2.12", | ||
| "@angular/compiler": "^21.2.12", | ||
| "@angular/core": "^21.2.12", | ||
| "@angular/forms": "^21.2.12", | ||
| "@angular/platform-browser": "^21.2.12", | ||
| "@faker-js/faker": "^10.4.0", | ||
| "@tanstack/angular-store": "^0.11.0", | ||
| "@tanstack/angular-table": "^9.0.0-alpha.46", | ||
| "rxjs": "~7.8.2", | ||
| "tslib": "^2.8.1" | ||
| }, | ||
| "devDependencies": { | ||
| "@angular/build": "^21.2.11", | ||
| "@angular/cli": "^21.2.11", | ||
| "@angular/compiler-cli": "^21.2.12", | ||
| "typescript": "6.0.3" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| import { provideBrowserGlobalErrorListeners } from '@angular/core' | ||
| import type { ApplicationConfig } from '@angular/core' | ||
|
|
||
| export const appConfig: ApplicationConfig = { | ||
| providers: [provideBrowserGlobalErrorListeners()], | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| <div class="demo-root"> | ||
| <div> | ||
| <button (click)="refreshData()" class="demo-button">Regenerate Data</button> | ||
| <button (click)="stressTest()" class="demo-button">Stress Test (200k rows)</button> | ||
| </div> | ||
| <div class="spacer-md"></div> | ||
| <table> | ||
| <thead> | ||
| @for (headerGroup of table.getHeaderGroups(); track headerGroup.id) { | ||
| <tr> | ||
| @for (header of headerGroup.headers; track header.id) { | ||
| <th [attr.colSpan]="header.colSpan"> | ||
| @if (!header.isPlaceholder) { | ||
| <div [class.sortable-header]="header.column.getCanSort()" (click)="header.column.getToggleSortingHandler()?.($event)"> | ||
| <ng-container *flexRenderHeader="header; let headerCell">{{ headerCell }}</ng-container> | ||
| @if (header.column.getIsSorted() === 'asc') { 🔼 } | ||
| @if (header.column.getIsSorted() === 'desc') { 🔽 } | ||
| </div> | ||
| } | ||
| </th> | ||
| } | ||
| </tr> | ||
| } | ||
| </thead> | ||
| <tbody> | ||
| @for (row of table.getRowModel().rows; track row.id) { | ||
| <tr> | ||
| @for (cell of row.getAllCells(); track cell.id) { | ||
| <td><ng-container *flexRenderCell="cell; let renderCell">{{ renderCell }}</ng-container></td> | ||
| } | ||
| </tr> | ||
| } | ||
| </tbody> | ||
| </table> | ||
| <div class="spacer-sm"></div> | ||
| <div class="controls"> | ||
| <button class="demo-button demo-button-sm" (click)="table.setPageIndex(0)" [disabled]="!table.getCanPreviousPage()"><<</button> | ||
| <button class="demo-button demo-button-sm" (click)="table.previousPage()" [disabled]="!table.getCanPreviousPage()"><</button> | ||
| <button class="demo-button demo-button-sm" (click)="table.nextPage()" [disabled]="!table.getCanNextPage()">></button> | ||
| <button class="demo-button demo-button-sm" (click)="table.setPageIndex(table.getPageCount() - 1)" [disabled]="!table.getCanNextPage()">>></button> | ||
| <span class="inline-controls"><div>Page</div><strong>{{ (pagination().pageIndex + 1).toLocaleString() }} of {{ table.getPageCount().toLocaleString() }}</strong></span> | ||
| <span class="inline-controls">| Go to page: <input type="number" min="1" [max]="table.getPageCount()" [value]="pagination().pageIndex + 1" (input)="onPageInputChange($event)" class="page-size-input" /></span> | ||
| <select [value]="pagination().pageSize" (change)="onPageSizeChange($event)"> | ||
| @for (pageSize of [10, 20, 30, 40, 50]; track pageSize) { | ||
| <option [value]="pageSize">Show {{ pageSize }}</option> | ||
| } | ||
| </select> | ||
| </div> | ||
| <div class="spacer-md"></div> | ||
| <button (click)="rerender()" class="demo-button">Rerender</button> | ||
| <span>Render count: {{ renderCount() }}</span> | ||
| <pre>{{ stateJson() }}</pre> | ||
| </div> | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: TanStack/table
Length of output: 102
🏁 Script executed:
Repository: TanStack/table
Length of output: 6700
Escape pagination arrow characters in Angular button text (HTML entities required).
examples/angular/basic-external-atoms/src/app/app.htmllines 37-40 contain raw</>characters in button text (<<,<,>,>>). These should be escaped to avoid Angular/HTML parsing/lint issues and to ensure the intended glyphs render.Proposed fix
🧰 Tools
🪛 HTMLHint (1.9.2)
[error] 37-37: Special characters must be escaped : [ < ].
(spec-char-escape)
[error] 37-37: Special characters must be escaped : [ < ].
(spec-char-escape)
[error] 38-38: Special characters must be escaped : [ < ].
(spec-char-escape)
[error] 39-39: Special characters must be escaped : [ > ].
(spec-char-escape)
[error] 40-40: Special characters must be escaped : [ > ].
(spec-char-escape)
[error] 40-40: Special characters must be escaped : [ > ].
(spec-char-escape)
🤖 Prompt for AI Agents