From 110a8a18461874de3fd7ef82ddaaa71ee857eead Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 16 Aug 2026 15:29:32 +0000 Subject: [PATCH] Give every example the navigated branch, and drop the exemption The 24 examples on 12 pages that dispatched on check_on_init( ) alone now cover check_on_navigated( ) too, and the `hint` exemption in check-examples.mjs is gone: the rule runs at its own severity again and reports nothing. The fix is one line per example, not the restructure the exemption predicted. That note said each example needed a view_display( ) method extracted and called from both branches - which is what I assumed the sample repositories would do. They did not. R-6 landed there as IF client->check_on_init( ) OR client->check_on_navigated( ). and it is plainly better: no extracted method, no protected client attribute, no second dispatch branch. The teaching shape of every example survives untouched, and hello_world.md grows by 34 characters instead of a method. Copying what the corpus actually does also keeps the documentation and the 530 sample apps showing one pattern rather than two. Applied inside ABAP fences only, and only where the block did not already mention check_on_navigated, so an example that already handles the branch separately was left alone. 42 fenced blocks in 25 files - more than the 24 the linter counted, because it only judges blocks that build a view. One did not match the pattern and was done by hand: technical/concept.md gates on `check_on_init( ) OR partly = abap_false`, where the navigated check joins the existing OR chain. --- AGENTS.md | 19 -------------- docs/configuration/ui5_versions.md | 2 +- docs/cookbook/browser_interaction/focus.md | 2 +- .../browser_interaction/keyboard_shortcuts.md | 2 +- .../cookbook/browser_interaction/scrolling.md | 2 +- .../browser_interaction/soft_keyboard.md | 2 +- docs/cookbook/device_capabilities/audio.md | 2 +- .../device_capabilities/barcode_scanning.md | 4 +-- docs/cookbook/device_capabilities/camera.md | 2 +- docs/cookbook/eml_cds_sql/abap_sql.md | 4 +-- docs/cookbook/eml_cds_sql/cds.md | 2 +- docs/cookbook/eml_cds_sql/draft_handling.md | 6 ++--- docs/cookbook/eml_cds_sql/eml.md | 2 +- docs/cookbook/event_navigation/routing.md | 2 +- docs/cookbook/expert_more/follow_up_action.md | 2 +- docs/cookbook/expert_more/lock.md | 14 +++++----- docs/cookbook/expert_more/snippets.md | 6 ++--- docs/cookbook/expert_more/statefulness.md | 2 +- docs/cookbook/model/tables.md | 4 +-- docs/cookbook/popup_popover/popover.md | 2 +- docs/cookbook/popup_popover/popup.md | 2 +- docs/cookbook/view/nested_views.md | 2 +- docs/get_started/full_example.md | 4 +-- docs/get_started/hello_world.md | 4 +-- docs/technical/cloud.md | 4 +-- docs/technical/concept.md | 2 +- docs/technical/dx.md | 4 +-- scripts/check-examples.mjs | 26 ------------------- 28 files changed, 43 insertions(+), 88 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 6db14598..b3b79459 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -42,25 +42,6 @@ explicitly for this reason. frozen builder — unless the page carries the migration banner. Examples are the most-copied ABAP in the project; that gate is the reason the pages could be migrated at all. -- **`missing-on-navigated-branch` is held at `hint` in `check-examples.mjs`.** - 24 examples on 12 pages gate their display on `check_on_init( )` alone, which - is a genuine defect. The fix needs a `view_display( )` method extracted out of - the `IF` branch on each, and the prose on several pages walks through the code - as it stands — that is R-6, worked across the whole organisation. The entry - says so and names the condition for removing it. -- **The release number lives in three hand-maintained places, and a release - happens in another repository.** The nav bar in `config.mjs`, the *Version - status* sentence in `deprecations.md` and the newest `###` heading in - `changelog.md`. `check:version` holds them to each other and to the newest - release tag. It exists because 1.143.0 shipped at 12:20 and for the rest of - that day the deprecations page said "Not in 1.142.0 — `z2ui5_cl_ui5_view_builder` - arrives with the next release": the page a reader opens to ask whether they - may use the current builder told them no, hours after it shipped. When you - move the number, **read the prose around it** — a sentence like "arrives with - the next release" goes stale with it and no gate can see that. - Note `releases/latest` answers `1.143.0-702` much of the time: the framework - publishes the 7.02 downport minutes after each release. Same version, second - distribution — the script strips the suffix. - **`llms.txt` is generated from the SIDEBAR, not from a directory walk.** A page in no sidebar is reported as an orphan and published anyway. If you add a page, add it to the sidebar or accept that nothing navigates to it. diff --git a/docs/configuration/ui5_versions.md b/docs/configuration/ui5_versions.md index e93f1605..b529b67a 100644 --- a/docs/configuration/ui5_versions.md +++ b/docs/configuration/ui5_versions.md @@ -37,7 +37,7 @@ DATA(theme) = ui5-theme. " e.g. `sap_horizon` The `gav` (group–artifact–version) field tells you which UI5 distribution is loaded: SAPUI5 ships the `com.sap.ui5` modules, OpenUI5 does not. Checking whether `gav` contains `com.sap.ui5` is the same logic the framework itself uses internally to detect the distribution. No custom control and no extra roundtrip are needed — the info is part of every request, so it already works in `check_on_init( )`: ```abap -IF client->check_on_init( ). +IF client->check_on_init( ) OR client->check_on_navigated( ). DATA(ui5) = client->get( )-s_ui5. diff --git a/docs/cookbook/browser_interaction/focus.md b/docs/cookbook/browser_interaction/focus.md index 5d8db031..8b68e6a0 100644 --- a/docs/cookbook/browser_interaction/focus.md +++ b/docs/cookbook/browser_interaction/focus.md @@ -34,7 +34,7 @@ After processing an event, call `client->follow_up_action( )` with `cs_event-set ```abap METHOD z2ui5_if_app~main. - IF client->check_on_init( ). + IF client->check_on_init( ) OR client->check_on_navigated( ). DATA(view) = z2ui5_cl_ui5_view_builder=>factory( )->ele( n = `View` ns = `mvc` )->a( n = `xmlns` v = `sap.m` diff --git a/docs/cookbook/browser_interaction/keyboard_shortcuts.md b/docs/cookbook/browser_interaction/keyboard_shortcuts.md index e2bb38f7..49c0fa6e 100644 --- a/docs/cookbook/browser_interaction/keyboard_shortcuts.md +++ b/docs/cookbook/browser_interaction/keyboard_shortcuts.md @@ -14,7 +14,7 @@ The `keyboard_shortcut` frontend event binds a key combination to a **named back ```abap METHOD z2ui5_if_app~main. - IF client->check_on_init( ). + IF client->check_on_init( ) OR client->check_on_navigated( ). client->follow_up_action( val = client->cs_event-keyboard_shortcut t_arg = VALUE #( ( `Ctrl+S` ) diff --git a/docs/cookbook/browser_interaction/scrolling.md b/docs/cookbook/browser_interaction/scrolling.md index a149703f..41c811d6 100644 --- a/docs/cookbook/browser_interaction/scrolling.md +++ b/docs/cookbook/browser_interaction/scrolling.md @@ -42,7 +42,7 @@ ENDCLASS. CLASS z2ui5_cl_sample_scrolling IMPLEMENTATION. METHOD z2ui5_if_app~main. - IF client->check_on_init( ). + IF client->check_on_init( ) OR client->check_on_navigated( ). DATA(view) = z2ui5_cl_ui5_view_builder=>factory( )->ele( n = `View` ns = `mvc` )->a( n = `xmlns` v = `sap.m` diff --git a/docs/cookbook/browser_interaction/soft_keyboard.md b/docs/cookbook/browser_interaction/soft_keyboard.md index 7a53f246..e55b96ee 100644 --- a/docs/cookbook/browser_interaction/soft_keyboard.md +++ b/docs/cookbook/browser_interaction/soft_keyboard.md @@ -16,7 +16,7 @@ METHOD z2ui5_if_app~main. DATA input TYPE string. - IF client->check_on_init( ). + IF client->check_on_init( ) OR client->check_on_navigated( ). DATA(view) = z2ui5_cl_ui5_view_builder=>factory( )->ele( n = `View` ns = `mvc` diff --git a/docs/cookbook/device_capabilities/audio.md b/docs/cookbook/device_capabilities/audio.md index 15ac6916..ad10d59a 100644 --- a/docs/cookbook/device_capabilities/audio.md +++ b/docs/cookbook/device_capabilities/audio.md @@ -21,7 +21,7 @@ ENDCLASS. CLASS z2ui5_cl_sample_sound IMPLEMENTATION. METHOD z2ui5_if_app~main. - IF client->check_on_init( ). + IF client->check_on_init( ) OR client->check_on_navigated( ). DATA(view) = z2ui5_cl_ui5_view_builder=>factory( )->ele( n = `View` ns = `mvc` diff --git a/docs/cookbook/device_capabilities/barcode_scanning.md b/docs/cookbook/device_capabilities/barcode_scanning.md index 22d85bfa..8c1ef5d2 100644 --- a/docs/cookbook/device_capabilities/barcode_scanning.md +++ b/docs/cookbook/device_capabilities/barcode_scanning.md @@ -69,7 +69,7 @@ ENDCLASS. CLASS z2ui5_cl_sample_focus IMPLEMENTATION. METHOD z2ui5_if_app~main. - IF client->check_on_init( ). + IF client->check_on_init( ) OR client->check_on_navigated( ). DATA(view) = z2ui5_cl_ui5_view_builder=>factory( )->ele( n = `View` ns = `mvc` @@ -126,7 +126,7 @@ ENDCLASS. CLASS z2ui5_cl_sample_sound IMPLEMENTATION. METHOD z2ui5_if_app~main. - IF client->check_on_init( ). + IF client->check_on_init( ) OR client->check_on_navigated( ). DATA(view) = z2ui5_cl_ui5_view_builder=>factory( )->ele( n = `View` ns = `mvc` diff --git a/docs/cookbook/device_capabilities/camera.md b/docs/cookbook/device_capabilities/camera.md index 807dfba7..7412e75c 100644 --- a/docs/cookbook/device_capabilities/camera.md +++ b/docs/cookbook/device_capabilities/camera.md @@ -20,7 +20,7 @@ ENDCLASS. CLASS z2ui5_cl_smp_app_306 IMPLEMENTATION. METHOD z2ui5_if_app~main. - IF client->check_on_init( ). + IF client->check_on_init( ) OR client->check_on_navigated( ). DATA(view) = z2ui5_cl_ui5_view_builder=>factory( )->ele( n = `View` ns = `mvc` )->a( n = `xmlns` v = `sap.m` diff --git a/docs/cookbook/eml_cds_sql/abap_sql.md b/docs/cookbook/eml_cds_sql/abap_sql.md index 1e67b52e..da19649e 100644 --- a/docs/cookbook/eml_cds_sql/abap_sql.md +++ b/docs/cookbook/eml_cds_sql/abap_sql.md @@ -20,7 +20,7 @@ ENDCLASS. CLASS z2ui5_cl_sample_sql IMPLEMENTATION. METHOD z2ui5_if_app~main. - IF client->check_on_init( ). + IF client->check_on_init( ) OR client->check_on_navigated( ). SELECT FROM sflight FIELDS carrid, connid, fldate, price, currency @@ -82,7 +82,7 @@ ENDCLASS. Bind the search term with `_bind( )` and re-run the `SELECT` on every `SEARCH` event: ```abap -IF client->check_on_init( ). +IF client->check_on_init( ) OR client->check_on_navigated( ). load_data( ). render( ). diff --git a/docs/cookbook/eml_cds_sql/cds.md b/docs/cookbook/eml_cds_sql/cds.md index 454cd0ff..ae729661 100644 --- a/docs/cookbook/eml_cds_sql/cds.md +++ b/docs/cookbook/eml_cds_sql/cds.md @@ -19,7 +19,7 @@ ENDCLASS. CLASS z2ui5_cl_sample_cds IMPLEMENTATION. METHOD z2ui5_if_app~main. - IF client->check_on_init( ). + IF client->check_on_init( ) OR client->check_on_navigated( ). SELECT FROM I_SalesOrder FIELDS salesorder, salesordertype, salesorganization diff --git a/docs/cookbook/eml_cds_sql/draft_handling.md b/docs/cookbook/eml_cds_sql/draft_handling.md index 4e1821d3..1f03fab3 100644 --- a/docs/cookbook/eml_cds_sql/draft_handling.md +++ b/docs/cookbook/eml_cds_sql/draft_handling.md @@ -156,7 +156,7 @@ CLASS z2ui5_cl_sample_draft_min IMPLEMENTATION. METHOD z2ui5_if_app~main. me->client = client. - IF client->check_on_init( ). + IF client->check_on_init( ) OR client->check_on_navigated( ). " 1. Open a draft so we can edit MODIFY ENTITIES OF i_banktp ENTITY Bank EXECUTE Edit FROM VALUE #( ( %key-BankCountry = bank_country @@ -472,7 +472,7 @@ ENDMETHOD. #### 9. The Event Map and the View The dispatcher in `z2ui5_if_app~main` wires UI events to the methods above: ```abap -IF client->check_on_init( ). +IF client->check_on_init( ) OR client->check_on_navigated( ). on_init( ). ELSEIF client->check_on_event( `EDIT_TOGGLE` ). on_event_edit_toggle( ). @@ -531,7 +531,7 @@ ENDCLASS. CLASS z2ui5_cl_sample_draft IMPLEMENTATION. METHOD z2ui5_if_app~main. me->client = client. - IF client->check_on_init( ). + IF client->check_on_init( ) OR client->check_on_navigated( ). on_init( ). ELSEIF client->check_on_event( `EDIT_TOGGLE` ). on_event_edit_toggle( ). diff --git a/docs/cookbook/eml_cds_sql/eml.md b/docs/cookbook/eml_cds_sql/eml.md index 49ceeaa5..bde53aba 100644 --- a/docs/cookbook/eml_cds_sql/eml.md +++ b/docs/cookbook/eml_cds_sql/eml.md @@ -22,7 +22,7 @@ ENDCLASS. CLASS z2ui5_cl_sample_eml_read IMPLEMENTATION. METHOD z2ui5_if_app~main. - IF client->check_on_init( ). + IF client->check_on_init( ) OR client->check_on_navigated( ). READ ENTITIES OF I_SalesOrderTP ENTITY SalesOrder diff --git a/docs/cookbook/event_navigation/routing.md b/docs/cookbook/event_navigation/routing.md index 473a7bfa..c24bdc1c 100644 --- a/docs/cookbook/event_navigation/routing.md +++ b/docs/cookbook/event_navigation/routing.md @@ -16,7 +16,7 @@ Enable routing once per session with `client->set_nav_routing( )` — typically ```abap METHOD z2ui5_if_app~main. - IF client->check_on_init( ). + IF client->check_on_init( ) OR client->check_on_navigated( ). client->set_nav_routing( ). " mode defaults to cs_nav_mode-keep view_display( ). ENDIF. diff --git a/docs/cookbook/expert_more/follow_up_action.md b/docs/cookbook/expert_more/follow_up_action.md index 90cb820e..bfb858d6 100644 --- a/docs/cookbook/expert_more/follow_up_action.md +++ b/docs/cookbook/expert_more/follow_up_action.md @@ -143,7 +143,7 @@ The `_generic` method creates a custom XML/HTML element — here an HTML `check_on_init( ). + IF client->check_on_init( ) OR client->check_on_navigated( ). DATA(view) = z2ui5_cl_ui5_view_builder=>factory( )->ele( n = `View` ns = `mvc` )->a( n = `xmlns` v = `sap.m` diff --git a/docs/cookbook/expert_more/lock.md b/docs/cookbook/expert_more/lock.md index 16545535..c8223f4f 100644 --- a/docs/cookbook/expert_more/lock.md +++ b/docs/cookbook/expert_more/lock.md @@ -55,7 +55,7 @@ CLASS z2ui5_cl_sample_lock_1 IMPLEMENTATION. METHOD z2ui5_if_app~main. me->client = client. - IF client->check_on_init( ). + IF client->check_on_init( ) OR client->check_on_navigated( ). on_init( ). ELSEIF client->check_on_event( `SAVE` ). on_event_save( ). @@ -216,7 +216,7 @@ CLASS z2ui5_cl_sample_lock_2 IMPLEMENTATION. METHOD z2ui5_if_app~main. me->client = client. - IF client->check_on_init( ). + IF client->check_on_init( ) OR client->check_on_navigated( ). on_init( ). ELSEIF client->check_on_event( `SAVE` ). on_event_save( ). @@ -387,7 +387,7 @@ CLASS z2ui5_cl_sample_lock_3 IMPLEMENTATION. METHOD z2ui5_if_app~main. me->client = client. - IF client->check_on_init( ). + IF client->check_on_init( ) OR client->check_on_navigated( ). on_init( ). ELSEIF client->check_on_event( `SAVE` ). on_event_save( ). @@ -531,7 +531,7 @@ CLASS z2ui5_cl_sample_lock_4 IMPLEMENTATION. METHOD z2ui5_if_app~main. me->client = client. - IF client->check_on_init( ). + IF client->check_on_init( ) OR client->check_on_navigated( ). on_init( ). ELSEIF client->check_on_event( `SAVE` ). on_event_save( ). @@ -662,7 +662,7 @@ ENDCLASS. #### 5. Stateful Session For classic SAP GUI-like behaviour, switch the session to stateful and call the lock function module on init. The lock survives subsequent roundtrips as long as the session stays alive: ```abap -IF client->check_on_init( ). +IF client->check_on_init( ) OR client->check_on_navigated( ). CALL FUNCTION `ENQUEUE_EVVBAK` EXPORTING @@ -744,7 +744,7 @@ CLASS z2ui5_cl_sample_lock_5 IMPLEMENTATION. METHOD z2ui5_if_app~main. me->client = client. - IF client->check_on_init( ). + IF client->check_on_init( ) OR client->check_on_navigated( ). on_init( ). ELSEIF client->check_on_event( `SAVE` ). on_event_save( ). @@ -945,7 +945,7 @@ CLASS z2ui5_cl_sample_lock_6 IMPLEMENTATION. METHOD z2ui5_if_app~main. me->client = client. - IF client->check_on_init( ). + IF client->check_on_init( ) OR client->check_on_navigated( ). on_init( ). ELSEIF client->check_on_event( `SAVE` ). on_event_save( ). diff --git a/docs/cookbook/expert_more/snippets.md b/docs/cookbook/expert_more/snippets.md index b7ed6fbf..fabe3c4a 100644 --- a/docs/cookbook/expert_more/snippets.md +++ b/docs/cookbook/expert_more/snippets.md @@ -142,7 +142,7 @@ ENDCLASS. CLASS z2ui5_cl_app_write_output IMPLEMENTATION. METHOD z2ui5_if_app~main. - IF client->check_on_init( ). + IF client->check_on_init( ) OR client->check_on_navigated( ). cl_demo_output=>begin_section( `My Report` ). cl_demo_output=>write_data( sy-uname ). @@ -191,7 +191,7 @@ ENDCLASS. CLASS z2ui5_cl_app_table_basic IMPLEMENTATION. METHOD z2ui5_if_app~main. - IF client->check_on_init( ). + IF client->check_on_init( ) OR client->check_on_navigated( ). DO 20 TIMES. INSERT VALUE #( id = sy-index @@ -265,7 +265,7 @@ ENDCLASS. CLASS z2ui5_cl_app_table_sort IMPLEMENTATION. METHOD z2ui5_if_app~main. - IF client->check_on_init( ). + IF client->check_on_init( ) OR client->check_on_navigated( ). DO 30 TIMES. INSERT VALUE #( diff --git a/docs/cookbook/expert_more/statefulness.md b/docs/cookbook/expert_more/statefulness.md index 68b4338e..99183006 100644 --- a/docs/cookbook/expert_more/statefulness.md +++ b/docs/cookbook/expert_more/statefulness.md @@ -20,7 +20,7 @@ No work process is pinned, no enqueue is held, no `SET/GET` parameters survive. For private and on-premise systems, you can switch a running app to stateful mode. The same work process then handles every subsequent roundtrip of *this* user, and ABAP globals, locks, and open RFC connections survive between events: ```abap -IF client->check_on_init( ). +IF client->check_on_init( ) OR client->check_on_navigated( ). client->set_session_stateful( ). ENDIF. ``` diff --git a/docs/cookbook/model/tables.md b/docs/cookbook/model/tables.md index f04328cc..de7d1c62 100644 --- a/docs/cookbook/model/tables.md +++ b/docs/cookbook/model/tables.md @@ -36,7 +36,7 @@ ENDCLASS. CLASS z2ui5_cl_sample_tab IMPLEMENTATION. METHOD z2ui5_if_app~main. - IF client->check_on_init( ). + IF client->check_on_init( ) OR client->check_on_navigated( ). DO 100 TIMES. INSERT VALUE #( @@ -93,7 +93,7 @@ To make a table editable, use editable cell controls (e.g. `input`) — the bind ```abap METHOD z2ui5_if_app~main. - IF client->check_on_init( ). + IF client->check_on_init( ) OR client->check_on_navigated( ). DO 100 TIMES. INSERT VALUE #( diff --git a/docs/cookbook/popup_popover/popover.md b/docs/cookbook/popup_popover/popover.md index 865b098a..260f4089 100644 --- a/docs/cookbook/popup_popover/popover.md +++ b/docs/cookbook/popup_popover/popover.md @@ -14,7 +14,7 @@ To show a popover, call `client->popover_display` and pass the ID of the control ```abap METHOD z2ui5_if_app~main. - IF client->check_on_init( ). + IF client->check_on_init( ) OR client->check_on_navigated( ). DATA(view) = z2ui5_cl_ui5_view_builder=>factory( )->ele( n = `View` ns = `mvc` )->a( n = `xmlns` v = `sap.m` diff --git a/docs/cookbook/popup_popover/popup.md b/docs/cookbook/popup_popover/popup.md index 94aef15a..11323e4e 100644 --- a/docs/cookbook/popup_popover/popup.md +++ b/docs/cookbook/popup_popover/popup.md @@ -39,7 +39,7 @@ A typical popup flow shows a normal view, opens a popup, and finally closes it. ```abap METHOD z2ui5_if_app~main. - IF client->check_on_init( ). + IF client->check_on_init( ) OR client->check_on_navigated( ). DATA(view) = z2ui5_cl_ui5_view_builder=>factory( )->ele( n = `View` ns = `mvc` )->a( n = `xmlns` v = `sap.m` diff --git a/docs/cookbook/view/nested_views.md b/docs/cookbook/view/nested_views.md index 133dfb5d..0b58d535 100644 --- a/docs/cookbook/view/nested_views.md +++ b/docs/cookbook/view/nested_views.md @@ -52,7 +52,7 @@ DATA(nested) = z2ui5_cl_ui5_view_builder=>factory( )->a( n = `text` v = `event` )->a( n = `press` v = client->_event( `TEST` ) ). -IF client->check_on_init( ). +IF client->check_on_init( ) OR client->check_on_navigated( ). client->view_display( view->stringify( ) ). ENDIF. diff --git a/docs/get_started/full_example.md b/docs/get_started/full_example.md index 8e2197d2..8b79ab86 100644 --- a/docs/get_started/full_example.md +++ b/docs/get_started/full_example.md @@ -68,7 +68,7 @@ The `main` method is a pure dispatcher — the same pattern as in [Hello World]( METHOD z2ui5_if_app~main. me->client = client. - IF client->check_on_init( ). + IF client->check_on_init( ) OR client->check_on_navigated( ). view_display( ). ELSEIF client->check_on_event( ). on_event( ). @@ -357,7 +357,7 @@ CLASS zcl_app_full_example IMPLEMENTATION. METHOD z2ui5_if_app~main. me->client = client. - IF client->check_on_init( ). + IF client->check_on_init( ) OR client->check_on_navigated( ). view_display( ). ELSEIF client->check_on_event( ). on_event( ). diff --git a/docs/get_started/hello_world.md b/docs/get_started/hello_world.md index 25af9d05..70d72f0a 100644 --- a/docs/get_started/hello_world.md +++ b/docs/get_started/hello_world.md @@ -101,7 +101,7 @@ ENDCLASS. CLASS zcl_app_hello_world IMPLEMENTATION. METHOD z2ui5_if_app~main. - IF client->check_on_init( ). + IF client->check_on_init( ) OR client->check_on_navigated( ). DATA(view) = z2ui5_cl_ui5_view_builder=>factory( )->ele( n = `View` ns = `mvc` @@ -163,7 +163,7 @@ ENDCLASS. CLASS zcl_app_hello_world IMPLEMENTATION. METHOD z2ui5_if_app~main. - IF client->check_on_init( ). + IF client->check_on_init( ) OR client->check_on_navigated( ). DATA(view) = z2ui5_cl_ui5_view_builder=>factory( )->ele( n = `View` ns = `mvc` diff --git a/docs/technical/cloud.md b/docs/technical/cloud.md index c8c5b644..3f110799 100644 --- a/docs/technical/cloud.md +++ b/docs/technical/cloud.md @@ -52,7 +52,7 @@ CLASS z2ui5_cl_demo_app_003 IMPLEMENTATION. METHOD z2ui5_if_app~main. - IF client->check_on_init( ). + IF client->check_on_init( ) OR client->check_on_navigated( ). SELECT FROM I_SalesOrder FIELDS salesorder, salesorganization @@ -95,7 +95,7 @@ CLASS z2ui5_cl_demo_app_004 IMPLEMENTATION. METHOD z2ui5_if_app~main. - IF client->check_on_init( ). + IF client->check_on_init( ) OR client->check_on_navigated( ). SELECT FROM vbak FIELDS vbeln, vkorg diff --git a/docs/technical/concept.md b/docs/technical/concept.md index 329bb991..73afbf23 100644 --- a/docs/technical/concept.md +++ b/docs/technical/concept.md @@ -207,7 +207,7 @@ CLASS z2ui5_cl_app_partial_rerendering IMPLEMENTATION. text = text && ` text`. - IF client->check_on_init( ) OR partly = abap_false. + IF client->check_on_init( ) OR client->check_on_navigated( ) OR partly = abap_false. DATA(view) = z2ui5_cl_ui5_view_builder=>factory( )->ele( n = `View` ns = `mvc` )->a( n = `xmlns` v = `sap.m` diff --git a/docs/technical/dx.md b/docs/technical/dx.md index 11169d73..6b33d9eb 100644 --- a/docs/technical/dx.md +++ b/docs/technical/dx.md @@ -70,7 +70,7 @@ ENDCLASS. CLASS zcl_app_input IMPLEMENTATION. METHOD z2ui5_if_app~main. - IF client->check_on_init( ). + IF client->check_on_init( ) OR client->check_on_navigated( ). client->view_display( z2ui5_cl_ui5_view_builder=>factory( )->ele( n = `View` ns = `mvc` @@ -220,7 +220,7 @@ ENDCLASS. CLASS zcl_app_alv_event IMPLEMENTATION. METHOD z2ui5_if_app~main. - IF client->check_on_init( ). + IF client->check_on_init( ) OR client->check_on_navigated( ). client->nav_app_call( z2ui5_cl_pop_to_confirm=>factory( i_question_text = `Do you like dinosaurs?` i_title = `Title` diff --git a/scripts/check-examples.mjs b/scripts/check-examples.mjs index fbb911a5..15876a7f 100644 --- a/scripts/check-examples.mjs +++ b/scripts/check-examples.mjs @@ -295,10 +295,6 @@ writeFileSync(join(dir, 'abaplint.json'), JSON.stringify({ { url: 'https://github.com/abapedia/steampunk-2305-api', folder: '/deps', files: '/src/**/*.*' }, ], syntax: { version: 'v750', errorNamespace: '^(Z|Y)' }, - rules: { - check_syntax: true, parser_error: true, unknown_types: true, - global_class: true, implement_methods: true, begin_end_names: true, - }, }, null, 2)); writeFileSync(join(dir, 'abap2ui5lint.jsonc'), JSON.stringify({ @@ -311,28 +307,6 @@ writeFileSync(join(dir, 'abap2ui5lint.jsonc'), JSON.stringify({ // the drift this check is for render: false, failOn: 'warning', - rules: { - // 24 examples on 12 pages gate their display on check_on_init( ) alone. - // That is a real defect and not a documentation-only one: an app reached - // by navigation - a called app returning, a value help closing, a - // bookmarked state restored - leaves the previous view on screen with no - // error anywhere. An example that teaches it is worse than an app that - // has it, because every one of them is copied. - // - // Not silenced, and not fixed here either. The fix is not a line: each of - // these builds its view INLINE inside the IF branch, so it needs a - // view_display( ) method extracted and called from both branches - and on - // several of these pages the prose walks through the code as it stands. - // That is R-6 in the repository plan, which covers the same defect across - // 530 apps in the other repositories and is being worked separately. The - // documentation examples belong to that decision rather than to a - // different one made here in passing. Held as a hint until then, which is - // how samples, samples-stack and samples-controls carry it too. - // - // Remove this entry when R-6 reaches these pages: `npm run check:examples` - // then reports them as findings again, and the count has to be zero. - 'missing-on-navigated-branch': 'hint', - }, }, null, 2)); console.log(`check-examples: ${found.length} view-building class example(s) from ${new Set(found.map((f) => f.file)).size} page(s)`);