Skip to content

custom component for path input #77

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
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Conversation

kamil-orwat-vmltech
Copy link
Collaborator

No description provided.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new component and corresponding API changes to support a custom path input for arguments across the frontend and backend. Key changes include:

  • Extending the argument types with PATH and adding associated type guards and model types.
  • Creating a new React component (PathInput) for selecting paths using a tree view.
  • Updating the backend with a new PathArgument class and integrating it into the argument configuration.

Reviewed Changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
ui.frontend/src/utils/api.types.ts Added PATH into ArgumentType and defined related type and type guard functions.
ui.frontend/src/components/PathInput.tsx Introduced a new PathInput component based on a tree view for path selection.
ui.frontend/src/components/CodeArgumentInput.tsx Updated to conditionally render the new PathInput component for PATH arguments.
ui.content/src/main/content/jcr_root/conf/acm/settings/snippet/available/core/argument/path.yml Added snippet definition for path arguments.
core/src/main/java/com/vml/es/aem/acm/core/code/arg/PathArgument.java Created a new class for PATH type arguments.
core/src/main/java/com/vml/es/aem/acm/core/code/Arguments.java Integrated new methods to construct PATH arguments.
core/src/main/java/com/vml/es/aem/acm/core/code/ArgumentType.java Extended enum to include PATH.
Files not reviewed (1)
  • ui.frontend/src/components/PathInput.module.css: Language not supported

@kamil-orwat-vmltech kamil-orwat-vmltech marked this pull request as ready for review April 24, 2025 13:59
@@ -87,7 +86,7 @@ const ExecutionView = () => {
<View backgroundColor="gray-50" padding="size-200" borderRadius="medium" borderColor="dark" borderWidth="thin">
<Flex direction="row" justifyContent="space-between" gap="size-200">
<LabeledValue label="ID" value={execution.id} flex="1" />
<LabeledValue label="User" value={execution.userId} flex="1" />
<LabeledValue label="User" value={execution.userId ? execution.userId : "unknown"} flex="1" />
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was throwing errors during development, so I added default version. Do we want to keep it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant