Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .claude/skills/view-chain-layout/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,10 @@ first child is another `ele( )`, blank before every `end( )`, none after an
The rule is the abap2UI5-linter's **`chain-house-layout`**. It checks rules 1-4
and carries fixes, so `--fix` reformats a drifted chain. The rewrite only ever
touches whitespace *between* chain segments and the indent of a continuation
line that is not itself content, and it verifies that collapsing every run of
code-whitespace leaves the source identical — **a layout fix can never change
what the view builds.** Rules 5-7 and the blank lines stay reviewer-enforced.
line that is not itself content — **by construction, not by a check**: the
fixes run to a fixed point and nothing re-parses the result against the
source, so read the diff of a `--fix` run before committing it. Rules 5-7 and
the blank lines stay reviewer-enforced.

It is the linter's one **opt-in** rule (`OPT_IN` in its `findings.mjs`): it is
not emitted at all until a config asks for it, because it encodes one house
Expand Down
158 changes: 122 additions & 36 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
},
"homepage": "https://github.com/abap2UI5/samples#readme",
"devDependencies": {
"@abap2ui5/linter": "^0.8.5",
"@abap2ui5/linter-render": "^0.8.5",
"@abap2ui5/linter": "^0.9.0",
"@abap2ui5/linter-render": "^0.9.0",
"@abaplint/cli": "^2.120.75",
"@openui5/sap.f": "1.152.0",
"@openui5/sap.m": "1.152.0",
Expand Down
27 changes: 13 additions & 14 deletions src/z2ui5_cl_smp_app_061.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -63,27 +63,27 @@ CLASS z2ui5_cl_smp_app_061 IMPLEMENTATION.
tab->ele( `columns`
)->ele( `Column`
)->tag( `Text`
)->a( n = `text` v = `uuid`
)->a( n = `text` v = `user`
)->end(
)->ele( `Column`
)->tag( `Text`
)->a( n = `text` v = `time`
)->a( n = `text` v = `date`
)->end(
)->ele( `Column`
)->tag( `Text`
)->a( n = `text` v = `previous`
)->a( n = `text` v = `time`
)->end( ).

tab->ele( `items`
)->ele( `ColumnListItem`
)->a( n = `selected` v = `{SELKZ}`
)->ele( `cells`
)->tag( `Input`
)->a( n = `value` v = `{ID}`
)->a( n = `value` v = `{UNAME}`
)->tag( `Input`
)->a( n = `value` v = `{TIMESTAMPL}`
)->a( n = `value` v = `{DATUM}`
)->tag( `Input`
)->a( n = `value` v = `{ID_PREV}` ).
)->a( n = `value` v = `{UZEIT}` ).

client->view_display( view->stringify( ) ).

Expand All @@ -99,11 +99,10 @@ CLASS z2ui5_cl_smp_app_061 IMPLEMENTATION.
IF client->check_on_init( ).

" The point of this sample is a row type built at runtime from a DDIC
" name; it needs SOME table that is present on every abap2UI5 system,
" and the framework ships no RELEASED DDIC object to use instead. Reading
" the draft table is not the lesson here - the dynamic typing is.
" abap2ui5lint-disable non-released-api
DATA(row_type) = CAST cl_abap_structdescr( cl_abap_typedescr=>describe_by_name( `Z2UI5_T_01` ) ).
" name. SYST - the structure behind sy - is present on every release
" abap2UI5 runs on, ABAP Cloud included; the framework's own draft table
" is not an API (building-apps guide, section 5) and is not used here.
DATA(row_type) = CAST cl_abap_structdescr( cl_abap_typedescr=>describe_by_name( `SYST` ) ).

" the DDIC components plus a SELKZ flag that exists in no dictionary:
" the Table's selection binds to it, so a selected row stays selected
Expand All @@ -116,12 +115,12 @@ CLASS z2ui5_cl_smp_app_061 IMPLEMENTATION.
CREATE DATA t_tab TYPE HANDLE tab_type.
ASSIGN t_tab->* TO <tab>.

DATA(entry) = VALUE z2ui5_t_01( id = `this is an uuid` timestampl = `20230823124303.1234567` id_prev = `previous` ).
" sy IS a SYST, so the rows are filled by component name - the only
" way to write a structure whose type exists at runtime alone
DO 3 TIMES.
APPEND INITIAL LINE TO <tab> ASSIGNING FIELD-SYMBOL(<row>).
MOVE-CORRESPONDING entry TO <row>.
MOVE-CORRESPONDING sy TO <row>.
ENDDO.
" abap2ui5lint-enable non-released-api

view_display( ).

Expand Down
1 change: 1 addition & 0 deletions src/z2ui5_cl_smp_app_507.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ CLASS z2ui5_cl_smp_app_507 IMPLEMENTATION.
render_list( parent = row
title = `_bind( t_omit omit_initial = abap_true )`
descr = `initial fields stay out: Design shows 5 stars - but Archived is enabled now, its abap_false was initial too`
" abap2ui5lint-disable-next-line omit-initial-drops-false -- the dropped abap_false IS the demo: the third list shows the fix
items = client->_bind( val = t_omit
omit_initial = abap_true ) ).

Expand Down
Loading