Skip to content

Commit 55a3260

Browse files
committed
fix(export): clamp labelColumnSpan against columnSpan at emission
APEX rejects labelColumnSpan >= columnSpan only at render time (WWV_FLOW_GRID_LAYOUT.LABEL_COLUMN_SPAN_TOO_BIG), never in apex validate/import. _reconcile_label already caps this after _place_row settles an item's real grid span, but _item_chunk trusted Placed.label_span unconditionally when writing labelColumnSpan. Re-clamp it there too, so the invariant holds regardless of which upstream layout path set it. Bump to 0.1.13.
1 parent 08a79ce commit 55a3260

7 files changed

Lines changed: 29 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@ All notable changes to FormsLang are documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.1.13] — 2026-09-04
9+
10+
### Fixed
11+
12+
- **A page item could still export with `labelColumnSpan >= columnSpan`**,
13+
which APEX rejects only at render time (`WWV_FLOW_GRID_LAYOUT
14+
.LABEL_COLUMN_SPAN_TOO_BIG`) -- never caught by `apex validate` or
15+
`apex import`. `_reconcile_label` in `apexlayout.py` already caps this
16+
after `_place_row` settles an item's real grid span, but the exporter
17+
trusted `Placed.label_span` unconditionally at the point it wrote
18+
`labelColumnSpan`. `_item_chunk` in `apexlang.py` now re-clamps the
19+
span against the item's actual `columnSpan` right where it emits it,
20+
closing the invariant regardless of which upstream layout path set it.
21+
822
## [0.1.12] — 2026-09-04
923

1024
### Fixed

desktop/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "formslang-desktop",
33
"private": true,
4-
"version": "0.1.12",
4+
"version": "0.1.13",
55
"scripts": {
66
"tauri": "tauri",
77
"icon:render": "node scripts/render-icon.mjs",

desktop/src-tauri/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

desktop/src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "formslang-desktop"
3-
version = "0.1.12"
3+
version = "0.1.13"
44
description = "FormsLang desktop shell (B2DEV TECH)"
55
edition = "2021"
66
license = "Apache-2.0"

desktop/src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://schema.tauri.app/config/2",
33
"productName": "FormsLang",
4-
"version": "0.1.12",
4+
"version": "0.1.13",
55
"identifier": "tech.b2dev.formslang",
66
"build": {
77
"frontendDist": "../ui-shell"

formslang/apexlang.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -404,12 +404,19 @@ def _item_chunk(
404404
)
405405
width = layout.chars(item.width) if kind == "textField" else None
406406
width_line = f"\n width: {width}" if width else ""
407-
template = _label_template(item, kind, side=placed.side, label_span=placed.label_span)
407+
# Belt-and-suspenders re-clamp of _reconcile_label's invariant: APEX
408+
# rejects labelColumnSpan >= columnSpan at render time only (neither
409+
# ``apex validate`` nor ``apex import`` catch it), so whatever upstream
410+
# layout path produced this Placed, never emit a span that violates it.
411+
label_span = placed.label_span
412+
if label_span and not placed.grid.flow:
413+
label_span = max(0, min(label_span, placed.grid.span - 1))
414+
template = _label_template(item, kind, side=placed.side, label_span=label_span)
408415
# A label left of the field takes the share of the cell the prompt took
409416
# on the canvas, so the field keeps its proportion to the prompt.
410417
span_line = (
411-
f"\n labelColumnSpan: {placed.label_span}"
412-
if template in {"optional", "required"} and placed.label_span
418+
f"\n labelColumnSpan: {label_span}"
419+
if template in {"optional", "required"} and label_span
413420
else ""
414421
)
415422
lov_block = ""

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "formslang"
7-
version = "0.1.12"
7+
version = "0.1.13"
88
description = "Oracle Forms analysis and AI-assisted conversion to Oracle APEX"
99
readme = "README.md"
1010
requires-python = ">=3.10"

0 commit comments

Comments
 (0)