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

Edit children parameters #1188

Merged
merged 10 commits into from
Oct 9, 2024
Merged

Conversation

didoda
Copy link
Member

@didoda didoda commented Oct 1, 2024

This provides a way to handle children association parameters.

To use it, set ChildrenParams configuration in your config/app_local.php, i.e.:

'ChildrenParams' => [
    'author' => [
        'description' => 'The author',
        'type' => 'string',
        'value' => 'john doe', // if value is set, it is used as default
    ],
    'summary' => [
        'description' => 'The summary',
        'type' => 'text',
        'value' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
    ],
    'validation_date"' => [
        'description' => 'The validation date',
        'type' => 'string',
        'format' => 'date',
        'value' => '2024-06-30',
    ],
    'validation_date_time' => [
        'description' => 'The validation date time',
        'type' => 'string',
        'format' => 'date-time',
        'value' => '2020-01-01T00:00:00Z',
    ],
    'score' => [
        'description' => 'The score',
        'type' => 'integer',
        'value' => 8,
    ],
    'visible' => [
        'description' => 'The visible flag',
        'type' => 'boolean',
        'value' => true,
    ],
    'status' => [
        'description' => 'The status',
        'enum' => ['draft', 'ready', 'done'],
        'type' => 'string',
        'value' => 'draft',
    ],
],

In folder view, children section, related objects will have an "edit params" button; when you click it, side panel opens and shows form data coming from your conf.

The key value is optional, if present, default value is set in form.

image

@didoda didoda added feature New feature or request release:minor labels Oct 1, 2024
@didoda didoda added this to the 4.x milestone Oct 1, 2024
Copy link

codecov bot commented Oct 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.70%. Comparing base (3973c8f) to head (f5e3d48).
Report is 6 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1188   +/-   ##
=========================================
  Coverage     99.70%   99.70%           
- Complexity     1310     1311    +1     
=========================================
  Files            97       97           
  Lines          5021     5024    +3     
=========================================
+ Hits           5006     5009    +3     
  Misses           15       15           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@didoda didoda marked this pull request as ready for review October 3, 2024 05:58
@fquffio
Copy link
Member

fquffio commented Oct 9, 2024

LGTM 🚀

@didoda didoda merged commit 57af22d into bedita:master Oct 9, 2024
19 checks passed
@didoda didoda deleted the feat/edit-children-parameters branch October 9, 2024 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request release:minor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants