Release Notes — v0.2.12 (July 2, 2026)
1. default_open — Accordion Fieldtab Initial State Control
Status: Uncommitted
Plan: .kilo/plans/1783015394894-default-open-fieldtabs.md
Fieldtab definitions now support an optional default_open boolean attribute to control whether an accordion tab starts expanded or collapsed on initial page load. When default_open is False, the Alpine.js active variable is set to null instead of the tab's forloop.counter, causing all tab panels to render collapsed until the user clicks a toggle button.
Usage
def detail_ui_view(self):
return {
'fieldtabs': [
{
'name': 'Basic Info',
'icon': 'Home',
'default_open': True, # expands on load (default)
'Fieldcolumns': [...]
},
{
'name': 'Advanced Settings',
'icon': 'Cog6Tooth',
'default_open': False, # COLLAPSED on load
'Fieldcolumns': [...]
},
]
}
Backend
enezaframework/views/mixins.py:UiMixin.get_fieldtab_config()(line 176): Added'default_open': tab.get('default_open', True)totab_dict.UiMixinjournal.get_fieldtab_config()(line 661): Same addition.
Templates (14 changes across 12 files)
All accordion x-data directives updated from:
x-data="{ active: {{ forloop.counter }} }"
to:
x-data="{ active: {% if tab.default_open %}{{ forloop.counter }}{% else %}null{% endif %} }"
| Partial | Notes |
|---|---|
core/partials/create_parameter_partial.html |
|
core/partials/create_partial.html |
|
core/partials/create_source_document_partial.html |
|
core/partials/detail_one-on_one_partial.html |
|
core/partials/detail_parameter_partial.html |
|
core/partials/detail_party_one_on_one.html |
|
core/partials/detail_source_document_partial.html |
Two loops (lines + header), both updated |
core/partials/main_object_form.html |
|
setups/partials/setup_create.html |
|
setups/partials/setup_details.html |
|
setups/partials/setup_readonly_create.html |
|
setups/partials/setup_readonly_details.html |
Excluded from scope:
- core/partials/create_right_modal.html — renders tabs as flat sections, no accordion pattern.
- journal/partials/journal_batch_create.html and journal_batch_detail.html — have the accordion pattern but were not in scope.
- attachments/partials/attachment_details.html — same reason.
Backward Compatibility
Defaulting default_open to True ensures zero behavioral change for all existing detail_ui_view definitions — all tabs remain expanded by default.
Alpine.js Behavior
When active is null, x-show="active === N" evaluates false for all N, collapsing the tab. The toggle button's @click handler still flips between the counter value and null, so interactivity is unaffected after initial load.
Files changed: 1 backend + 12 templates = 13 files.
2. Inline Template — Column width and Field full_width Fix
Status: Uncommitted
Seven inline templates had hardcoded lg:w-1/2 on column wrapper divs and were missing full_width=field|field_full_width on {% smart_field %} calls. This caused column-level 'width': 'full' and field-level 'full_width': True configurations to be silently ignored in all inline create, detail, and update views.
Column Width Fix
Before (hardcoded):
<div class="lg:w-1/2 w-full ltr:lg:mr-6 rtl:lg:ml-6">
After (dynamic):
<div class="{{ column.width_class }} w-full{% if not column.is_full %} ltr:lg:mr-6 rtl:lg:ml-6{% endif %}">
The backend already computed width_class as 'lg:w-full' when column.get('width') == 'full' (otherwise 'lg:w-1/2'), but the inline templates ignored it. The margin is now conditionally applied only when the column is not full-width.
Field full_width Fix
Before (missing filter):
{% smart_field form field_name disabled=True %}
After (with filter):
{% smart_field form field_name disabled=True full_width=field|field_full_width %}
The field_full_width filter reads field._ui_config.get('full_width', False), which is set by get_fieldcolumn_config(). This was already working in non-inline templates but was omitted from all inline partials.
Affected Files
| File | Type |
|---|---|
core/partials/inline_update_partial.html |
Inline detail/edit |
core/partials/inline_create_partial.html |
Inline create |
core/partials/inline_create_add_con_partial.html |
Inline create with conditions |
core/partials/inline_details_partial.html |
Inline detail (read) |
core/partials/inline_details_add_con_partial.html |
Inline detail with conditions |
setups/partials/inline_create_partial.html |
Setup inline create |
setups/partials/inline_details_partial.html |
Setup inline detail |
Files changed: 7 files.
3. Test App — default_open Demo & note Field
Status: Uncommitted
frameworkapp/models.py
- Added
noteTextField (blank=True, null=True) toFrameworktestdocumentlineto demonstratefull_width+rich_textrendering in inline views.
frameworkapp/views/testviews.py
FrameworkTestDetailView: Added'default_open': Falseto the "Approval/Posting" tab.FrameworktestdocumentDetailView: Added'default_open': Falseto the "Document Lines" tab.FrameworktestdocumentlineDetailView: Added a new "Note" tab with'width': 'full','full_width': True,'rich_text': True, anddisable_ifon ancestorApprovalstatus == 'approved'.
Migration
frameworkapp/migrations/0009_frameworktestdocumentline_note_and_more.py— addsnoteto bothFrameworktestdocumentlineandHistoricalFrameworktestdocumentline(nullable, no default needed).
Files changed: 3 files (models, views, migration).
4. Version Bump
setup.py: Version bumped from0.2.11→0.2.12.
Summary
| Area | Description | Files |
|---|---|---|
default_open Feature |
New fieldtab attribute controlling accordion tab initial open/closed state; defaults to True for full backward compatibility |
13 |
| Inline Width Fix | Column width: 'full' and field full_width: True now honored in inline views; hardcoded lg:w-1/2 replaced with dynamic column.width_class |
7 |
| Test App | note field on Frameworktestdocumentline, demo default_open and width: 'full' configs in test views, migration 0009 |
3 |
| Versioning | Version bumped to 0.2.12 | 1 |
Total: 23 modified files, 1 new migration file, 71 insertions, 43 deletions.
Note: All changes are uncommitted and untested. The user is solely responsible for testing and validating all outputs before committing or deploying.