Skip to content
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: support static action forms with layout #1182

Merged
merged 8 commits into from
Oct 7, 2024

Conversation

realSpok
Copy link
Contributor

Definition of Done

#86c097c1w

General

  • Write an explicit title for the Pull Request, following Conventional Commits specification
  • Test manually the implemented changes
  • Validate the code quality (indentation, syntax, style, simplicity, readability)

Security

  • Consider the security impact of the changes made

@forest-bot
Copy link
Member

Comment on lines 123 to 124
field =>
field.type === 'Layout' || // all forms containing some layout elements are handled as dynamic
Object.values(field).some(value => this.isHandler(value)) ||
Copy link
Member

Choose a reason for hiding this comment

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

recursive check for layout elements

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes. I will wait for the pages to be available I think

Comment on lines 734 to 735
describe('with a form with layout elements', () => {
test('should be flagged as dynamic form', () => {
newBooks.addAction('make photocopy', {
scope: 'Single',
execute: (context, resultBuilder) => {
return resultBuilder.error('meeh');
},
form: [
{ label: 'firstname', type: 'String' },
{ type: 'Layout', component: 'Separator' },
{ label: 'lastname', type: 'String' },
],
});

expect(newBooks.schema.actions['make photocopy']).toEqual({
scope: 'Single',
generateFile: false,
staticForm: false,
});
});

test('should compute the form recursively', async () => {
Copy link
Member

Choose a reason for hiding this comment

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

keep this test with dynamic elements in a row in a page

Copy link
Member

@EnkiP EnkiP left a comment

Choose a reason for hiding this comment

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

...

Copy link
Member

@EnkiP EnkiP left a comment

Choose a reason for hiding this comment

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

sry missclick again :/ need recursive check in getForms

Copy link

codeclimate bot commented Oct 7, 2024

Code Climate has analyzed commit 4b3231f and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (98% is the threshold).

This pull request will bring the total coverage in the repository to 97.5% (0.0% change).

View more on Code Climate.

@realSpok realSpok merged commit 92011d8 into main Oct 7, 2024
23 checks passed
@realSpok realSpok deleted the feat/support-static-action-forms-with-layout branch October 7, 2024 15:39
forest-bot added a commit that referenced this pull request Oct 7, 2024
forest-bot added a commit that referenced this pull request Oct 7, 2024
@forest-bot
Copy link
Member

🎉 This PR is included in version 1.4.3 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

@forest-bot
Copy link
Member

🎉 This PR is included in version 1.11.2 🎉

The release is available on example@1.11.2

Your semantic-release bot 📦🚀

@forest-bot
Copy link
Member

🎉 This PR is included in version 1.50.0 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

@forest-bot
Copy link
Member

🎉 This PR is included in version 1.55.0 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

@forest-bot
Copy link
Member

🎉 This PR is included in version 1.1.35 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

@forest-bot
Copy link
Member

🎉 This PR is included in version 1.11.22 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

@forest-bot
Copy link
Member

🎉 This PR is included in version 1.4.3 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

@forest-bot
Copy link
Member

🎉 This PR is included in version 1.1.6 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

@forest-bot
Copy link
Member

🎉 This PR is included in version 1.3.3 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

forest-bot added a commit that referenced this pull request Oct 9, 2024
## [1.10.3](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sequelize@1.10.2...@forestadmin/datasource-sequelize@1.10.3) (2024-10-09)

### Bug Fixes

* required fields are not required in schema when they have default values ([#1185](#1185)) ([a5501fc](a5501fc))
* search hook with layout ([#1187](#1187)) ([e75a06e](e75a06e))

### Features

* support static action forms with layout ([#1182](#1182)) ([92011d8](92011d8))
forest-bot added a commit that referenced this pull request Oct 9, 2024
## [1.14.29](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.14.28...@forestadmin/datasource-sql@1.14.29) (2024-10-09)

### Bug Fixes

* required fields are not required in schema when they have default values ([#1185](#1185)) ([a5501fc](a5501fc))
* search hook with layout ([#1187](#1187)) ([e75a06e](e75a06e))

### Features

* support static action forms with layout ([#1182](#1182)) ([92011d8](92011d8))
@forest-bot
Copy link
Member

🎉 This PR is included in version 1.10.3 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

@forest-bot
Copy link
Member

🎉 This PR is included in version 1.14.29 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

forest-bot added a commit that referenced this pull request Oct 10, 2024
## [1.8.4](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-mongoose@1.8.3...@forestadmin/datasource-mongoose@1.8.4) (2024-10-10)

### Bug Fixes

* missing exported type ([#1192](#1192)) ([7e26bd9](7e26bd9))
* **permissions:** properly check permissions when dissociating or deleting related resources ([#1190](#1190)) ([211fd1f](211fd1f))
* required fields are not required in schema when they have default values ([#1185](#1185)) ([a5501fc](a5501fc))
* search hook with layout ([#1187](#1187)) ([e75a06e](e75a06e))

### Features

* support static action forms with layout ([#1182](#1182)) ([92011d8](92011d8))
forest-bot added a commit that referenced this pull request Oct 10, 2024
## [1.42.1](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-toolkit@1.42.0...@forestadmin/datasource-toolkit@1.42.1) (2024-10-10)

### Bug Fixes

* missing exported type ([#1192](#1192)) ([7e26bd9](7e26bd9))
* **permissions:** properly check permissions when dissociating or deleting related resources ([#1190](#1190)) ([211fd1f](211fd1f))
* required fields are not required in schema when they have default values ([#1185](#1185)) ([a5501fc](a5501fc))
* search hook with layout ([#1187](#1187)) ([e75a06e](e75a06e))

### Features

* support static action forms with layout ([#1182](#1182)) ([92011d8](92011d8))
@forest-bot
Copy link
Member

🎉 This PR is included in version 1.3.24 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

forest-bot added a commit that referenced this pull request Oct 10, 2024
## [1.34.1](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/forestadmin-client@1.34.0...@forestadmin/forestadmin-client@1.34.1) (2024-10-10)

### Bug Fixes

* missing exported type ([#1192](#1192)) ([7e26bd9](7e26bd9))
* **permissions:** properly check permissions when dissociating or deleting related resources ([#1190](#1190)) ([211fd1f](211fd1f))
* required fields are not required in schema when they have default values ([#1185](#1185)) ([a5501fc](a5501fc))
* search hook with layout ([#1187](#1187)) ([e75a06e](e75a06e))

### Features

* support static action forms with layout ([#1182](#1182)) ([92011d8](92011d8))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants