-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add DSL for easier agent customization #208
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
base: main
Are you sure you want to change the base?
Conversation
5 new issues
This is from Qlty Cloud, the successor to Code Climate Quality. Learn more. |
...tasource_customizer/lib/forest_admin_datasource_customizer/dsl/helpers/collection_helpers.rb
Show resolved
Hide resolved
...tasource_customizer/lib/forest_admin_datasource_customizer/dsl/helpers/collection_helpers.rb
Show resolved
Hide resolved
...atasource_customizer/lib/forest_admin_datasource_customizer/dsl/context/execution_context.rb
Show resolved
Hide resolved
...in_datasource_customizer/lib/forest_admin_datasource_customizer/dsl/builders/form_builder.rb
Show resolved
Hide resolved
|
Diff Coverage: The code coverage on the diff in this pull request is 97.7%. Total Coverage: This PR will increase coverage by 0.13%. File Coverage Changes
🛟 Help
This is from Qlty Cloud, the successor to Code Climate Quality. Learn more. |
...in_datasource_customizer/lib/forest_admin_datasource_customizer/dsl/builders/form_builder.rb
Show resolved
Hide resolved
...in_datasource_customizer/lib/forest_admin_datasource_customizer/dsl/builders/form_builder.rb
Show resolved
Hide resolved
cc1dd80 to
c9ef24f
Compare
...in_datasource_customizer/lib/forest_admin_datasource_customizer/dsl/builders/form_builder.rb
Show resolved
Hide resolved
...in_datasource_customizer/lib/forest_admin_datasource_customizer/dsl/builders/form_builder.rb
Show resolved
Hide resolved
...in_datasource_customizer/lib/forest_admin_datasource_customizer/dsl/builders/form_builder.rb
Show resolved
Hide resolved
|
|
||
| # Disable search on this collection | ||
| def disable_search | ||
| replace_search { |_query, _context| nil } |
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.
There is a function disable_search, replace with null is false
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.
fixed
| # end | ||
| # | ||
| # @param block [Proc] search handler | ||
| def enable_search(&block) |
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.
enable_search is not the right naming for this imo, usually search is enabled by default by the DS, you either disable it or replace the search not enable it
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.
fixed
| # @param key [String] header name | ||
| # @param value [String] header value | ||
| # @return [ExecutionContext] self for chaining | ||
| def set_header(key, value) |
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.
Not useful If I'm not wrong
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.
you are correct, I have removed it
| # Add a section/page layout to group fields | ||
| # @param component [String] layout component type | ||
| # @param block [Proc] block containing nested fields | ||
| def section(component: 'Page', &block) |
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.
let's keep the name page as to not confuse the user
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.
fixed
...in_datasource_customizer/lib/forest_admin_datasource_customizer/dsl/builders/form_builder.rb
Show resolved
Hide resolved
| # @param headers [Hash] HTTP headers | ||
| # @param body [Hash] request body | ||
| # @return [Hash] the webhook result | ||
| def webhook(url, method: 'POST', headers: {}, body: {}) |
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.
| # @param default [Object] default value | ||
| # @param enum_values [Array] enum values if type is enum | ||
| # @param block [Proc] computation block receiving (records, context) | ||
| def computed_field(name, type:, depends_on: [], default: nil, enum_values: nil, &block) |
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.
| # @param origin_key [String, Symbol] origin key field | ||
| # @param foreign_key [String, Symbol] foreign key field (for many-to-many) | ||
| # @param through [String, Symbol] through collection (for many-to-many) | ||
| def has_many(name, collection: nil, origin_key: nil, foreign_key: nil, through: nil) |
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.
...in_datasource_customizer/lib/forest_admin_datasource_customizer/dsl/builders/form_builder.rb
Show resolved
Hide resolved
c41f08c to
6eb5ea8
Compare
| # @param description [String] field description | ||
| # @param placeholder [String] placeholder text | ||
| # @param block [Proc] optional proc for computed values | ||
| def field(name, type:, widget: nil, options: nil, readonly: false, default: nil, |
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.
Definition of Done
General
Security