Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: bump the react group across 2 directories with 2 updates#14895

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Show file tree
Hide file tree
Changes fromall 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
2 changes: 1 addition & 1 deletionofflinedocs/package.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -31,7 +31,7 @@
"devDependencies": {
"@types/lodash": "4.14.196",
"@types/node": "20.14.8",
"@types/react": "18.3.3",
"@types/react": "18.3.10",
"@types/react-dom": "18.3.0",
"eslint": "8.57.0",
"eslint-config-next": "14.2.13",
Expand Down
409 changes: 202 additions & 207 deletionsofflinedocs/pnpm-lock.yaml
View file
Open in desktop

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletionssite/package.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -128,10 +128,10 @@
"@types/jest": "29.5.12",
"@types/lodash": "4.17.9",
"@types/node": "20.14.8",
"@types/react": "18.2.6",
"@types/react": "18.3.10",
"@types/react-color": "3.0.6",
"@types/react-date-range": "1.4.4",
"@types/react-dom": "18.2.4",
"@types/react-dom": "18.3.0",
"@types/react-syntax-highlighter": "15.5.13",
"@types/react-virtualized-auto-sizer": "1.0.4",
"@types/react-window": "1.8.8",
Expand Down
441 changes: 222 additions & 219 deletionssite/pnpm-lock.yaml
View file
Open in desktop

Large diffs are not rendered by default.

30 changes: 20 additions & 10 deletionssite/src/modules/resources/ResourceCard.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ import { CopyableValue } from "components/CopyableValue/CopyableValue";
import { DropdownArrow } from "components/DropdownArrow/DropdownArrow";
import { MemoizedInlineMarkdown } from "components/Markdown/Markdown";
import { Stack } from "components/Stack/Stack";
import { Children, type FC,type PropsWithChildren,useState } from "react";
import { Children, type FC, useState } from "react";
import { ResourceAvatar } from "./ResourceAvatar";
import { SensitiveValue } from "./SensitiveValue";

Expand DownExpand Up@@ -75,14 +75,6 @@ export interface ResourceCardProps {
agentRow: (agent: WorkspaceAgent) => JSX.Element;
}

const p: FC<PropsWithChildren> = ({ children }) => {
const childrens = Children.toArray(children);
if (childrens.every((child) => typeof child === "string")) {
return <CopyableValue value={childrens.join("")}>{children}</CopyableValue>;
}
return <>{children}</>;
};

export const ResourceCard: FC<ResourceCardProps> = ({ resource, agentRow }) => {
const [shouldDisplayAllMetadata, setShouldDisplayAllMetadata] =
useState(false);
Expand DownExpand Up@@ -146,7 +138,25 @@ export const ResourceCard: FC<ResourceCardProps> = ({ resource, agentRow }) => {
{meta.sensitive ? (
<SensitiveValue value={meta.value} />
) : (
<MemoizedInlineMarkdown components={{ p }}>
<MemoizedInlineMarkdown
components={{
p: ({ children }) => {
const childrens = Children.toArray(children);
if (
childrens.every(
(child) => typeof child === "string",
)
) {
return (
<CopyableValue value={childrens.join("")}>
{children}
</CopyableValue>
);
}
return <>{children}</>;
},
}}
>
{meta.value}
</MemoizedInlineMarkdown>
)}
Expand Down
37 changes: 20 additions & 17 deletionssite/src/pages/WorkspacePage/ResourceMetadata.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,12 +3,7 @@ import type { WorkspaceResource } from "api/typesGenerated";
import { CopyableValue } from "components/CopyableValue/CopyableValue";
import { MemoizedInlineMarkdown } from "components/Markdown/Markdown";
import { SensitiveValue } from "modules/resources/SensitiveValue";
import {
Children,
type FC,
type HTMLAttributes,
type PropsWithChildren,
} from "react";
import { Children, type FC, type HTMLAttributes } from "react";

type ResourceMetadataProps = Omit<HTMLAttributes<HTMLElement>, "resource"> & {
resource: WorkspaceResource;
Expand DownExpand Up@@ -41,7 +36,25 @@ export const ResourceMetadata: FC<ResourceMetadataProps> = ({
{meta.sensitive ? (
<SensitiveValue value={meta.value} />
) : (
<MemoizedInlineMarkdown components={{ p: MetaValue }}>
<MemoizedInlineMarkdown
components={{
p: ({ children }) => {
const childrenArray = Children.toArray(children);
if (
childrenArray.every(
(child) => typeof child === "string",
)
) {
return (
<CopyableValue value={childrenArray.join("")}>
{children}
</CopyableValue>
);
}
return <>{children}</>;
},
}}
>
{meta.value}
</MemoizedInlineMarkdown>
)}
Expand All@@ -54,16 +67,6 @@ export const ResourceMetadata: FC<ResourceMetadataProps> = ({
);
};

const MetaValue: FC<PropsWithChildren> = ({ children }) => {
const childrenArray = Children.toArray(children);
if (childrenArray.every((child) => typeof child === "string")) {
return (
<CopyableValue value={childrenArray.join("")}>{children}</CopyableValue>
);
}
return <>{children}</>;
};

const styles = {
root: (theme) => ({
padding: 24,
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp