Skip to content

Commit

Permalink
Merge branch 'main' into rejig-dashboard-buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
yomete authored Nov 13, 2024
2 parents 6fa5b4c + ab2d9dd commit 48e967f
Show file tree
Hide file tree
Showing 13 changed files with 11,521 additions and 2,988 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
run: pnpm install --frozen-lockfile --prefer-offline && pnpm run build
# 👇 Adds Chromatic as a step in the workflow
- name: Publish to Chromatic
uses: chromaui/action@2929680e80a2298d17561b7f1deaa334653f905e # v11.16.5
uses: chromaui/action@35a1a6175c54119f1b83a015a5f7bc810b763f69 # v11.16.5
# Chromatic GitHub Action options
with:
# 👇 Chromatic projectToken, refer to the manage page to obtain it.
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ jobs:
cache-dependency-path: ui/pnpm-lock.yaml

- name: Initialize CodeQL
uses: github/codeql-action/init@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
uses: github/codeql-action/init@4f3212b61783c3c68e8309a0f18a699764811cda # v3.27.1
with:
languages: ${{ matrix.language }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
uses: github/codeql-action/analyze@4f3212b61783c3c68e8309a0f18a699764811cda # v3.27.1
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Initialize CodeQL
uses: github/codeql-action/init@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
uses: github/codeql-action/init@4f3212b61783c3c68e8309a0f18a699764811cda # v3.27.1
with:
languages: ${{ matrix.language }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
uses: github/codeql-action/analyze@4f3212b61783c3c68e8309a0f18a699764811cda # v3.27.1
4 changes: 2 additions & 2 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ COPY ui .
COPY --from=ui-deps /app/node_modules ./node_modules
RUN pnpm install --frozen-lockfile --prefer-offline && pnpm run build

FROM docker.io/golang:1.23.2-alpine@sha256:9dd2625a1ff2859b8d8b01d8f7822c0f528942fe56cfe7a1e7c38d3b8d72d679 AS builder
FROM docker.io/golang:1.23.3-alpine@sha256:09742590377387b931261cbeb72ce56da1b0d750a27379f7385245b2b058b63a AS builder

# renovate: datasource=go depName=github.com/go-delve/delve
ARG DLV_VERSION=v1.23.1
Expand Down Expand Up @@ -45,7 +45,7 @@ COPY ./gen /app/gen

RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -gcflags="all=-N -l" -o parca ./cmd/parca

FROM docker.io/golang:1.23.2-alpine@sha256:9dd2625a1ff2859b8d8b01d8f7822c0f528942fe56cfe7a1e7c38d3b8d72d679
FROM docker.io/golang:1.23.3-alpine@sha256:09742590377387b931261cbeb72ce56da1b0d750a27379f7385245b2b058b63a

COPY --from=builder /go/bin/dlv /
COPY --from=builder /go/bin/grpc-health-probe /
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.go.dev
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# vim: ft=dockerfile
# Designed to only used by Tilt to iterate faster on the API.
FROM docker.io/golang:1.23.2-alpine@sha256:9dd2625a1ff2859b8d8b01d8f7822c0f528942fe56cfe7a1e7c38d3b8d72d679 AS builder
FROM docker.io/golang:1.23.3-alpine@sha256:09742590377387b931261cbeb72ce56da1b0d750a27379f7385245b2b058b63a AS builder

# renovate: datasource=go depName=github.com/go-delve/delve
ARG DLV_VERSION=v1.23.1
Expand Down Expand Up @@ -36,7 +36,7 @@ COPY ./gen /app/gen
# goreleaser build --single-target
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -gcflags="all=-N -l" -o parca ./cmd/parca

FROM docker.io/golang:1.23.2-alpine@sha256:9dd2625a1ff2859b8d8b01d8f7822c0f528942fe56cfe7a1e7c38d3b8d72d679
FROM docker.io/golang:1.23.3-alpine@sha256:09742590377387b931261cbeb72ce56da1b0d750a27379f7385245b2b058b63a

COPY --from=builder /go/bin/dlv /
COPY --from=builder /go/bin/grpc-health-probe /
Expand Down
2 changes: 1 addition & 1 deletion deploy/jsonnetfile.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"subdir": "deploy/lib/parca-agent"
}
},
"version": "48f7888d8c44c2d6e74dd6b1a474e62de44212f6",
"version": "2e00ac03054f6cd722f42ce564ec66c0b8bf7ef8",
"sum": "2lFeo1cibXb6qfaDC+ELdb9v4U2R9//1rbSuRn564MQ="
},
{
Expand Down
10 changes: 5 additions & 5 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@
"@storybook/react": "8.3.6",
"@storybook/react-vite": "8.3.6",
"@storybook/test": "8.3.6",
"@swc/cli": "0.4.0",
"@swc/core": "1.7.40",
"@swc/jest": "0.2.36",
"@swc/cli": "0.5.0",
"@swc/core": "1.9.1",
"@swc/jest": "0.2.37",
"@testing-library/jest-dom": "5.17.0",
"@testing-library/react": "13.4.0",
"@types/command-line-args": "5.2.3",
Expand All @@ -81,7 +81,7 @@
"eslint-plugin-react": "7.37.2",
"eslint-plugin-react-hooks": "4.6.2",
"eslint-plugin-standard": "5.0.0",
"eslint-plugin-storybook": "0.10.1",
"eslint-plugin-storybook": "0.11.0",
"eslint-plugin-typescript-enum": "2.1.0",
"execa": "6.1.0",
"fs-extra": "10.1.0",
Expand All @@ -91,7 +91,7 @@
"internal-ip": "7.0.0",
"jest": "29.7.0",
"jest-environment-jsdom": "29.7.0",
"lerna": "8.1.8",
"lerna": "8.1.9",
"local-web-server": "5.4.0",
"next-transpile-modules": "9.1.0",
"ora": "6.3.1",
Expand Down
4 changes: 4 additions & 0 deletions ui/packages/app/web/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.16.770](https://github.com/parca-dev/parca/compare/@parca/[email protected]...@parca/[email protected]) (2024-11-12)

**Note:** Version bump only for package @parca/web

## [0.16.769](https://github.com/parca-dev/parca/compare/@parca/[email protected]...@parca/[email protected]) (2024-11-06)

**Note:** Version bump only for package @parca/web
Expand Down
2 changes: 1 addition & 1 deletion ui/packages/app/web/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@parca/web",
"private": true,
"version": "0.16.769",
"version": "0.16.770",
"description": "Parca Web Interface",
"type": "module",
"scripts": {
Expand Down
4 changes: 4 additions & 0 deletions ui/packages/shared/profile/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.16.443](https://github.com/parca-dev/parca/compare/@parca/[email protected]...@parca/[email protected]) (2024-11-12)

**Note:** Version bump only for package @parca/profile

## [0.16.442](https://github.com/parca-dev/parca/compare/@parca/[email protected]...@parca/[email protected]) (2024-11-06)

**Note:** Version bump only for package @parca/profile
Expand Down
2 changes: 1 addition & 1 deletion ui/packages/shared/profile/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@parca/profile",
"version": "0.16.442",
"version": "0.16.443",
"description": "Profile viewing libraries",
"dependencies": {
"@headlessui/react": "^1.7.19",
Expand Down
68 changes: 42 additions & 26 deletions ui/packages/shared/profile/src/SimpleMatchers/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,11 @@ const CustomSelect: React.FC<CustomSelectProps> = ({
setIsOpen(true);
} else if (focusedIndex !== -1) {
onSelection(filteredItems[focusedIndex].key);
setIsOpen(false);
if (editable) {
setSearchTerm(filteredItems[focusedIndex].key);
} else {
setIsOpen(false);
}
}
} else if (e.key === 'Escape') {
setIsOpen(false);
Expand Down Expand Up @@ -169,6 +173,16 @@ const CustomSelect: React.FC<CustomSelectProps> = ({
}
};

const handleSelection = (value: string): void => {
onSelection(value);
if (editable) {
setSearchTerm(value);
setIsOpen(true);
} else {
setIsOpen(false);
}
};

return (
<div ref={containerRef} className="relative" onKeyDown={handleKeyDown} onClick={onButtonClick}>
<div
Expand Down Expand Up @@ -209,38 +223,41 @@ const CustomSelect: React.FC<CustomSelectProps> = ({
>
{searchable && (
<div className="sticky z-10 top-[-5px] w-auto max-w-full">
<div className={cx('relative', editable ? 'h-full min-h-[50px]' : 'h-[45px]')}>
<div className="flex flex-col">
{editable ? (
<textarea
ref={searchInputRef as React.LegacyRef<HTMLTextAreaElement>}
className="w-full px-4 py-2 h-full text-sm border-b border-gray-200 rounded-none ring-0 outline-none bg-gray-50 dark:bg-gray-800 dark:text-white"
placeholder={editable ? 'Type a RegEx to add' : 'Search...'}
value={searchTerm}
onChange={e => setSearchTerm(e.target.value)}
/>
<>
<textarea
ref={searchInputRef as React.LegacyRef<HTMLTextAreaElement>}
className="w-full px-4 py-2 text-sm border-b border-gray-200 rounded-none ring-0 outline-none bg-gray-50 dark:bg-gray-800 dark:text-white min-h-[50px]"
placeholder="Type a RegEx to add"
value={searchTerm}
onChange={e => setSearchTerm(e.target.value)}
/>
{editable && searchTerm.length > 0 && (
<div className="p-2 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800">
<Button
variant="primary"
className="w-full h-[30px]"
onClick={() => {
onSelection(searchTerm);
setIsOpen(false);
}}
>
Add
</Button>
</div>
)}
</>
) : (
<input
ref={searchInputRef as React.LegacyRef<HTMLInputElement>}
type="text"
className="w-full px-4 h-full text-sm border-none rounded-none ring-0 outline-none bg-gray-50 dark:bg-gray-800 dark:text-white"
placeholder={editable ? 'Type a RegEx to add' : 'Search...'}
className="w-full px-4 h-[45px] text-sm border-none rounded-none ring-0 outline-none bg-gray-50 dark:bg-gray-800 dark:text-white"
placeholder="Search..."
value={searchTerm}
onChange={e => setSearchTerm(e.target.value)}
/>
)}

{editable && searchTerm.length > 0 && (
<Button
variant="neutral"
className="absolute bottom-[10px] right-[10px] h-[30px]"
onClick={() => {
onSelection(searchTerm);
setIsOpen(false);
}}
>
Add{' '}
</Button>
)}
</div>
</div>
)}
Expand Down Expand Up @@ -269,8 +286,7 @@ const CustomSelect: React.FC<CustomSelectProps> = ({
tabIndex={-1}
onClick={() => {
if (!(item.disabled ?? false)) {
onSelection(item.key);
setIsOpen(false);
handleSelection(item.key);
}
}}
>
Expand Down
Loading

0 comments on commit 48e967f

Please sign in to comment.