-
Notifications
You must be signed in to change notification settings - Fork 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
feat(form): support layout elements in smart action form hooks #691
Conversation
if %w[Page Row].include?(element[:component]) | ||
extract = extract_fields_and_layout_for_component(element) | ||
element[:component] = element[:component].camelize(:lower) | ||
layout << element | ||
fields.concat(extract[:fields]) | ||
else | ||
element[:component] = element[:component].camelize(:lower) | ||
layout << element | ||
end |
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.
I wonder if by any chance the line
element[:component] = element[:component].camelize(:lower)
could be put just above the if? 🤔
but not sure because of the use of the method: extract_fields_and_layout_for_component
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.
If I put the line before the if the extract_fields_and_layout_for_component
function will not work.
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.
I have updated extract_fields_and_layout_for_component
and add a comment to explain why Page
becomes page
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.
👍
Code Climate has analyzed commit d15284c and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (55% is the threshold). This pull request will bring the total coverage in the repository to 51.0%. View more on Code Climate. |
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.
yeah it's better with 100% diff coverage 🎖️
# [9.4.0](v9.3.16...v9.4.0) (2024-10-17) ### Features * **form:** support layout elements in smart action form hooks ([#691](#691)) ([d2a2d47](d2a2d47))
🎉 This PR is included in version 9.4.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Definition of Done
General
Security