Skip to content

FormsLang 1.2.0

Choose a tag to compare

@gevianajr gevianajr released this 05 Sep 23:57
· 110 commits to main since this release

The fidelity release. A Forms screen now lands on the APEX grid where Forms drew it — each control on the column its x maps to, gaps kept, labels beside their fields with the room they had, toolbar buttons side by side, initial values filled in — plus an opt-in AI layout assistant for the regions the deterministic rules cannot lay out cleanly.

What is new

  • Grid placement from x. A control starts on the grid column its Forms x maps to and spans the columns its width covers; the whitespace Forms drew before it stays an empty column. When two controls round onto the same column the second moves right; a row too crowded for twelve columns continues on the next grid row, and the controls after the wrapped one follow it there, keeping their distance. Every concession is recorded on the control in the mapping report (pushed, wrapped, shrunk, label-narrow, label-above).
  • Labels beside their fields. labelColumnSpan is in grid columns and comes from the room the prompt takes in Forms; a row that cannot give every label a column puts all of its labels above, one rhythm per row. A caption right of or below a field becomes a label above it, no longer a floating label that read as a placeholder.
  • Static defaults. A literal InitializeValue becomes the item's default and fills the field on render. On a radio group or select list the default is written only when it is one of the choices — APEX would otherwise add it as an extra, selected choice; a value that is a choice's label takes that choice's return value, and the report says so.
  • Toolbars keep adjacent buttons in one grid cell, as on the Forms toolbar. Buttons render as plain buttons wired for a dynamic action, not submits. A required check box is left optional, with a note: a required APEX check box must be checked, while Forms only meant "has a value".
  • AI layout assistant, opt-in per export (--ai-layout on the CLI, a checkbox in the export dialog). Only the hard regions are sent to the provider configured in Settings — those with a control the rules had to push, wrap, narrow or relabel, or a Forms row of five or more controls — with the region's size and each control's name, kind, type, geometry, caption and the rules' own placement; never column names, code or data. The plan is validated (every control exactly once, columns 1..12, no overlaps, every label narrower than its field) and applied to the one layout model the export and the preview share. A rejected, offline or failed answer keeps the rules' placement, and the manifest says what happened under layout.ai_layout. The plan is cached on the session and replayed while the layout is unchanged, so the export stays deterministic; the enterprise egress policy is checked before any request leaves the machine.
  • The preview draws the default inside the field, the radio button it selects, and the label's exact share of its cell.

Verified on APEX 26.1.0

The showcase module was exported, validated, imported into a dedicated application and rendered through ORDS as a temporary end user. Against the 1.1.0 export of the same page: empty grid columns kept as whitespace 0 → 30; labels beside their field 23 → 28; floating labels 9 → 2 (the two check boxes only); required check boxes 1 → 0; the TP_STATUS radio group renders its three buttons with the Forms initial value selected and the TP_UNIDADE list preselected; 35 buttons as type="button"; no error banner, no LABEL_COLUMN_SPAN_TOO_BIG, no ORA- error. Showcase totals: 72 visible controls, 46 faithful / 26 approximation / 0 unsupported (14 toolbar controls that flow inline, 6 fields of an eight-field row moved or wrapped, 2 captions right/below now above, 2 boilerplate prompts, 1 radio group without return values, 1 required check box); 21 groups, 15 / 6 / 0. Test suite: 928 passed, 1 skipped.

The geometry rules, the matrix, the before/after table and the assistant's contract are in docs/layout-mapping-matrix.md.

Known limitations

Positions are kept to the column, not the pixel; a row wider than twelve columns is redrawn as two grid rows (or as the assistant proposes); toolbars flow inline; captions right of or below a field become labels above it; initial values that are Forms expressions ($$DATE$$, :GLOBAL.x) are notes, not computations; the assistant was exercised against a scripted provider in the test suite, not against a hosted model on the showcase.

Install

Windows: FormsLang_1.2.0_x64-setup.exe (NSIS) or FormsLang_1.2.0_x64_en-US.msi. Python: pip install -e . from the tag. Full changelog: CHANGELOG.md.