-
Notifications
You must be signed in to change notification settings - Fork 0
Separate datetime args #105
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
Conversation
There was a problem hiding this 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 separates datetime handling into distinct date, time, and datetime conversions and argument types. Key changes include:
- Updates to the Dates utility functions and UI usage to clearly differentiate between datetime, date, and time.
- Modifications to API types and argument type guards to support new DATE and TIME argument types, along with new argument classes in the core module.
- Enhancements to core code by refactoring DateTimeArgument and introducing dedicated DateArgument and TimeArgument classes.
Reviewed Changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
ui.frontend/src/utils/dates.ts | Introduces separate conversion helpers for datetime, date, and time. |
ui.frontend/src/utils/api.types.ts | Updates ArgumentType and type guards to include DATE and TIME. |
ui.frontend/src/pages/HistoryPage.tsx | Adjusts usage of Dates functions for proper datetime conversion. |
ui.frontend/src/components/CodeArgumentInput.tsx | Switches between DateField, TimeField, and DatePicker based on argument type. |
core/src/main/java/dev/vml/es/acm/core/util/DateUtils.java | Refactors exception messages and adds LocalTime conversion. |
core/src/main/java/dev/vml/es/acm/core/repo/RepoResource.java | Minor formatting update for resource creation. |
core/src/main/java/dev/vml/es/acm/core/code/arg/TimeArgument.java | New class for handling time-specific arguments. |
core/src/main/java/dev/vml/es/acm/core/code/arg/StringArgument.java | Adds display options for string arguments. |
core/src/main/java/dev/vml/es/acm/core/code/arg/DateTimeArgument.java | Removes redundant setter overloads in favor of a cleaner API. |
core/src/main/java/dev/vml/es/acm/core/code/arg/DateArgument.java | New class dedicated to date-specific arguments. |
core/src/main/java/dev/vml/es/acm/core/code/ArgumentsValueMap.java | Revises conversion logic to support the newly added types. |
core/src/main/java/dev/vml/es/acm/core/code/Arguments.java | Adds helper methods for date and time arguments. |
core/src/main/java/dev/vml/es/acm/core/code/ArgumentType.java | Expands enum to include DATE and TIME. |
Files not reviewed (1)
- ui.content.example/src/main/content/jcr_root/conf/acm/settings/script/manual/example/ACME-201_arguments.groovy: Language not supported
Comments suppressed due to low confidence (1)
core/src/main/java/dev/vml/es/acm/core/code/arg/DateTimeArgument.java:22
- Removal of multiple overloaded setters for min and max (e.g., accepting LocalDate or primitive values) simplifies the API, but ensure that any external callers relying on those overloads are updated accordingly.
public class DateTimeArgument extends Argument<LocalDateTime> {
No description provided.