Skip to content

Upgrade to react 19 #274

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

Merged
merged 14 commits into from
May 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 22 additions & 70 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,44 +106,12 @@ jobs:
- name: Execute 'npm ci' in monorepo
run: npm ci

- name: Install examples
run: npm ci --prefix examples

- name: Execute 'npm i' in www/dataserver
run: npm run www-dataserver:install

# - name: Load cached node_modules for root
# id: cache-node-modules-root
# uses: actions/cache@v3
# with:
# path: node_modules
# key: node-modules-root-${{ github.run_id }}

# - name: Load cached node_modules for source
# id: cache-node-modules-source
# uses: actions/cache@v3
# with:
# path: source/node_modules
# key: node-modules-source-${{ github.run_id }}

# - name: Load cached node_modules for examples
# id: cache-node-modules-examples
# uses: actions/cache@v3
# with:
# path: examples/node_modules
# key: node-modules-examples-${{ github.run_id }}

# - name: Load cached node_modules for www
# id: cache-node-modules-www
# uses: actions/cache@v3
# with:
# path: www/node_modules
# key: node-modules-www-${{ github.run_id }}

# - name: Load cached node_modules for www/dataserver
# id: cache-node-modules-www-dataserver
# uses: actions/cache@v3
# with:
# path: www/dataserver/node_modules
# key: node-modules-www-dataserver-${{ github.run_id }}

- name: Compile source code in monorepo
run: npm run ci:ts-check

Expand All @@ -167,6 +135,9 @@ jobs:
- name: Execute 'npm ci' in monorepo
run: npm ci

- name: Install examples
run: npm ci --prefix examples

- name: Execute 'npm i' in www/dataserver
run: npm run www-dataserver:install

Expand All @@ -175,45 +146,19 @@ jobs:
run: echo "::set-output name=version::$(npm ls @playwright/test | grep @playwright | sed 's/.*@//')"
working-directory: examples

- name: Cache browser binaries for Playwright
id: playwright-cache
uses: actions/cache@v3
- name: Restore cached browser binaries for Playwright
id: playwright-restore
uses: actions/cache/restore@v4
with:
path: '~/.cache/ms-playwright'
key: '${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.version }}'

# - name: Load cached node_modules for root
# id: cache-node-modules-root
# uses: actions/cache@v3
# with:
# path: node_modules
# key: node-modules-root-${{ github.run_id }}

# - name: Load cached node_modules for source
# id: cache-node-modules-source
# uses: actions/cache@v3
# with:
# path: source/node_modules
# key: node-modules-source-${{ github.run_id }}

# - name: Load cached node_modules for examples
# id: cache-node-modules-examples
# uses: actions/cache@v3
# with:
# path: examples/node_modules
# key: node-modules-examples-${{ github.run_id }}

# - name: Get installed Playwright version
# id: playwright-version
# run: echo "::set-output name=version::$(npm ls @playwright/test | grep @playwright | sed 's/.*@//')"
# working-directory: examples

# - name: Load cached browser binaries for Playwright
# id: playwright-cache
# uses: actions/cache@v3
# with:
# path: '~/.cache/ms-playwright'
# key: '${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.version }}'
- name: Install Playwright browsers
# this will not install anything if the previous step found a cached browser binary
run: npx playwright install --with-deps chromium
working-directory: examples
env:
CI: true

- name: Build component # in the www folder, some CSS files are used from the source/dist folder
run: npm run build
Expand All @@ -225,3 +170,10 @@ jobs:
run: npm run ci:test:run
env:
NEXT_PUBLIC_ADAPTABLE_LICENSE_KEY: ${{ secrets.NEXT_PUBLIC_ADAPTABLE_LICENSE_KEY }}

- name: Save browser binaries for Playwright
id: playwright-save
uses: actions/cache/save@v4
with:
path: '~/.cache/ms-playwright'
key: '${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.version }}'
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,28 @@ jobs:
- name: Install
run: npm ci

- name: Install examples
run: npm ci --prefix examples

- name: Get installed Playwright version
id: playwright-version
run: echo "::set-output name=version::$(npm ls @playwright/test | grep @playwright | sed 's/.*@//')"
working-directory: examples

- name: Restore cached browser binaries for Playwright
id: playwright-restore
uses: actions/cache/restore@v4
with:
path: '~/.cache/ms-playwright'
key: '${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.version }}'

- name: Install Playwright browsers
# this will not install anything if the previous step found a cached browser binary
run: npx playwright install --with-deps chromium
working-directory: examples
env:
CI: true

- name: Build component # in the www folder, some CSS files are used from the source/dist folder
run: npm run build

Expand All @@ -57,6 +79,13 @@ jobs:
- name: Running Playwright Tests
run: npm run ci:test:run

- name: Save browser binaries for Playwright
id: playwright-save
uses: actions/cache/save@v4
with:
path: '~/.cache/ms-playwright'
key: '${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.version }}'

# - name: Linting
# run: npm run lint
# working-directory: source
Expand Down
119 changes: 61 additions & 58 deletions devtools-ui/src/components/app-sidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
import * as React from 'react';
import {
ChevronRight,
CircleCheck,
File,
Folder,
HighlighterIcon,
Table,
} from 'lucide-react';
import { ChevronRight, File, Folder, Table } from 'lucide-react';

import {
Collapsible,
Expand Down Expand Up @@ -80,57 +73,66 @@ export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {

const highlight = useHighlight();
return (
<Sidebar {...props}>
<SidebarContent>
<SidebarGroup>
<SidebarGroupLabel>Components</SidebarGroupLabel>
<SidebarGroupContent>
<SidebarMenu>
{detectedDebugIds.map((debugId, index) => (
<SidebarMenuItem key={index}>
<SidebarMenuButton
className={cn(
'cursor-pointer ',
activeDebugId === debugId && 'bg-accent',
)}
onClick={(event) => {
const deselect =
(event.ctrlKey || event.metaKey) && activeDebugId;
<>
<Sidebar {...props}>
<SidebarContent>
<SidebarGroup>
<SidebarGroupLabel>Components</SidebarGroupLabel>
<SidebarGroupContent>
<SidebarMenu>
{detectedDebugIds.map((debugId, index) => (
<SidebarMenuItem key={index}>
<SidebarMenuButton
className={cn(
'cursor-pointer ',
activeDebugId === debugId && 'bg-accent',
)}
onClick={(event) => {
const deselect =
(event.ctrlKey || event.metaKey) && activeDebugId;

if (deselect) {
setActiveDebugId(null);
} else {
if (activeDebugId !== debugId) {
setActiveDebugId(debugId);
highlight(debugId);
if (deselect) {
setActiveDebugId(null);
} else {
if (activeDebugId !== debugId) {
setActiveDebugId(debugId);
highlight(debugId);
}
}
}
}}
>
<Table />
{debugId}
</SidebarMenuButton>
<SidebarMenuBadge
className={cn(
'invisible',
activeDebugId === debugId && 'visible',
)}
>
<div
onClick={(e) => {
e.preventDefault();
highlight(debugId);
}}
className="block w-4 h-4 bg-green-500 rounded-full"
></div>
</SidebarMenuBadge>
</SidebarMenuItem>
))}
</SidebarMenu>
</SidebarGroupContent>
</SidebarGroup>
>
<Table />
{debugId}
</SidebarMenuButton>
<SidebarMenuBadge
className={cn(
'invisible',
activeDebugId === debugId && 'visible',
)}
>
<div
onClick={(e) => {
e.preventDefault();
highlight(debugId);
}}
className="block w-4 h-4 bg-green-500 rounded-full"
></div>
</SidebarMenuBadge>
</SidebarMenuItem>
))}
</SidebarMenu>
{!detectedDebugIds.length && (
<div className="text-muted-foreground text-sm gap-10 grid my-5 leading-relaxed">
<p>{`No components found.`}</p>
<p>
{`Your <InfiniteTable /> components need the "debugId" prop to show up in the devtools.`}
</p>
</div>
)}
</SidebarGroupContent>
</SidebarGroup>

{/* <SidebarGroup>
{/* <SidebarGroup>
<SidebarGroupLabel>Files</SidebarGroupLabel>
<SidebarGroupContent>
<SidebarMenu>
Expand All @@ -140,9 +142,10 @@ export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
</SidebarMenu>
</SidebarGroupContent>
</SidebarGroup> */}
</SidebarContent>
<SidebarRail />
</Sidebar>
</SidebarContent>
<SidebarRail />
</Sidebar>
</>
);
}

Expand Down
1 change: 1 addition & 0 deletions devtools/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ lerna-debug.log*
node_modules
dist
dist-ssr
dist-dev
*.local

# Editor directories and files
Expand Down
Loading
Loading