Skip to content

Commit

Permalink
Merge pull request #72 from fantonangeli/sync-main
Browse files Browse the repository at this point in the history
Sync main branch with Apache main branch
  • Loading branch information
rgdoliveira authored Jan 7, 2025
2 parents 563bb1f + 823370b commit 11c1b53
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 75 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -332,21 +332,25 @@ export function JavaFunctionExpression({
// Class
if (u.rowIndex === 0) {
setExpression((prev: Normalized<BoxedFunctionJava>) => {
clazz.expression = {
...clazz.expression,
__$$element: "literalExpression",
text: {
__$$text: u.value,
},
};

// Do not inline this variable for type safety. See https://github.com/microsoft/TypeScript/issues/241
const ret: Normalized<BoxedFunction> = {
...prev,
expression: {
__$$element: "context",
...context,
contextEntry: [clazz, method],
contextEntry: [
{
...clazz,
expression: {
...clazz.expression,
__$$element: "literalExpression",
text: {
__$$text: u.value,
},
},
},
method,
],
},
};

Expand All @@ -356,22 +360,26 @@ export function JavaFunctionExpression({
// Method
else if (u.rowIndex === 1) {
setExpression((prev: Normalized<BoxedFunctionJava>) => {
method.expression = {
...method.expression,
__$$element: "literalExpression",
"@_id": method.expression["@_id"] ?? generateUuid(),
text: {
__$$text: u.value,
},
};

// Do not inline this variable for type safety. See https://github.com/microsoft/TypeScript/issues/241
const ret: Normalized<BoxedFunction> = {
...prev,
expression: {
__$$element: "context",
...context,
contextEntry: [clazz, method],
contextEntry: [
clazz,
{
...method,
expression: {
...method.expression,
__$$element: "literalExpression",
"@_id": method.expression["@_id"] ?? generateUuid(),
text: {
__$$text: u.value,
},
},
},
],
},
};
return ret;
Expand Down
2 changes: 1 addition & 1 deletion packages/kn-plugin-workflow/pkg/command/gen_manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func NewGenManifest() *cobra.Command {
{{.Name}} gen-manifest --skip-namespace
# Persist the generated Operator manifests on a specific custom path
{{.Name}} gen-manifest --custom-generated-manifest-dir=<full_directory_path>
{{.Name}} gen-manifest --custom-generated-manifests-dir=<full_directory_path>
# Specify a custom subflows files directory. (default: ./subflows)
{{.Name}} gen-manifest --subflows-dir=<full_directory_path>
Expand Down
112 changes: 57 additions & 55 deletions packages/online-editor/src/home/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -320,62 +320,64 @@ export function WorkspaceCard(props: {
rejected={() => <>ERROR</>}
resolved={(workspace) => (
<>
{(editableFiles.length === 1 && workspace.descriptor.origin.kind === WorkspaceKind.LOCAL && (
<Card
isSelected={props.isSelected}
isSelectable={true}
onMouseOver={() => setHovered(true)}
onMouseLeave={() => setHovered(false)}
isHoverable={true}
isCompact={true}
style={{ cursor: "pointer" }}
onClick={() => {
history.push({
pathname: routes.workspaceWithFilePath.path({
workspaceId: editableFiles[0].workspaceId,
fileRelativePath: editableFiles[0].relativePathWithoutExtension,
extension: editableFiles[0].extension,
}),
});
}}
>
<CardHeader>
<FileLink file={editableFiles[0]} style={{ width: "100%", minWidth: 0 }}>
<CardHeaderMain style={{ width: "100%" }}>
<SingleFileWorkspaceListItem
isBig={true}
file={editableFiles[0]}
workspaceDescriptor={workspace.descriptor}
{(editableFiles.length === 1 &&
workspacePromise.data?.files.length === 1 &&
workspace.descriptor.origin.kind === WorkspaceKind.LOCAL && (
<Card
isSelected={props.isSelected}
isSelectable={true}
onMouseOver={() => setHovered(true)}
onMouseLeave={() => setHovered(false)}
isHoverable={true}
isCompact={true}
style={{ cursor: "pointer" }}
onClick={() => {
history.push({
pathname: routes.workspaceWithFilePath.path({
workspaceId: editableFiles[0].workspaceId,
fileRelativePath: editableFiles[0].relativePathWithoutExtension,
extension: editableFiles[0].extension,
}),
});
}}
>
<CardHeader>
<FileLink file={editableFiles[0]} style={{ width: "100%", minWidth: 0 }}>
<CardHeaderMain style={{ width: "100%" }}>
<SingleFileWorkspaceListItem
isBig={true}
file={editableFiles[0]}
workspaceDescriptor={workspace.descriptor}
/>
</CardHeaderMain>
</FileLink>
<CardActions
style={{ visibility: isHovered ? "visible" : "hidden" }}
onClick={(e) => e.stopPropagation()} // Prevent bug when clicking at the backdrop of ResponsiveDropdown
>
<DeleteDropdownWithConfirmation
key={`${workspace.descriptor.workspaceId}-${isHovered}`}
onDelete={() => {
props.onDelete?.();
workspaces.deleteWorkspace({ workspaceId: props.workspaceId });
}}
item={
<Flex flexWrap={{ default: "nowrap" }}>
<FlexItem>
Delete <b>{`"${editableFiles[0].nameWithoutExtension}"`}</b>
</FlexItem>
<FlexItem>
<b>
<FileLabel extension={editableFiles[0].extension} />
</b>
</FlexItem>
</Flex>
}
/>
</CardHeaderMain>
</FileLink>
<CardActions
style={{ visibility: isHovered ? "visible" : "hidden" }}
onClick={(e) => e.stopPropagation()} // Prevent bug when clicking at the backdrop of ResponsiveDropdown
>
<DeleteDropdownWithConfirmation
key={`${workspace.descriptor.workspaceId}-${isHovered}`}
onDelete={() => {
props.onDelete?.();
workspaces.deleteWorkspace({ workspaceId: props.workspaceId });
}}
item={
<Flex flexWrap={{ default: "nowrap" }}>
<FlexItem>
Delete <b>{`"${editableFiles[0].nameWithoutExtension}"`}</b>
</FlexItem>
<FlexItem>
<b>
<FileLabel extension={editableFiles[0].extension} />
</b>
</FlexItem>
</Flex>
}
/>
</CardActions>
</CardHeader>
</Card>
)) || (
</CardActions>
</CardHeader>
</Card>
)) || (
<Card
isExpanded={false}
isSelected={props.isSelected}
Expand Down

0 comments on commit 11c1b53

Please sign in to comment.