Skip to content

Commit 7c637d6

Browse files
oblomov-devclaude
andauthored
Claude/messagetoast sample yn7ayy (#676)
* Add sap.m.MessageToast sample Rebuild of the UI5 demo kit sample sap.m.sample.MessageToast in src/01/08/00 (controls - sap.m). The app lets the user configure the toast text, duration, width, docking position (my/at), offset and animation and shows it via client->message_toast_display( ). Regenerated the src/01 overview catalog. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019ozaBZ3RrmRj587C5p79bh * Add sap.m.MessageBox sample Rebuild of the UI5 demo kit sample sap.m.sample.MessageBox in src/01/08/00 (controls - sap.m). The app lets the user configure the message box title, message and details, then open the confirm, information, success, warning, error or a custom (multi-action) box via client->message_box_display( ). Regenerated the src/01 overview catalog. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019ozaBZ3RrmRj587C5p79bh * Move message toast and message box samples to src/01/01 Move the sap.m.MessageToast and sap.m.MessageBox samples from src/01/08/00 (controls - sap.m) to src/01/01 (framework - basics) and regenerate the src/01 overview catalog. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019ozaBZ3RrmRj587C5p79bh * Merge message toast and message box samples into one Combine the separate sap.m.MessageToast (381) and sap.m.MessageBox (382) samples in src/01/01 into a single "Messages" sample that demonstrates both client->message_toast_display( ) and client->message_box_display( ) in one view (two configuration panels). Delete the former 382 class and regenerate the src/01 overview catalog. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019ozaBZ3RrmRj587C5p79bh * Merge message box demo (187) into messages demo (008) Fold the ABAP-object message box demo from z2ui5_cl_demo_app_187 (SY message, BAPIRET2 structure and CX_ROOT exception passed to client->message_box_display( )) into z2ui5_cl_demo_app_008, which already showcases message box, message strip and message toast. Delete the now-redundant 187 class and regenerate the src/01 overview catalog. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019ozaBZ3RrmRj587C5p79bh * Add back buttons and update app 061 description - Add an explicit footer back button (bound to _event_nav_app_leave) to the message toast (381) and message box (382) samples. - Change the description of z2ui5_cl_demo_app_061 from "More - Work with RTTI" to "More - Generic Data Reference". - Regenerate the src/01 overview catalog. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019ozaBZ3RrmRj587C5p79bh * fixes * fixes * fix * fixes * fix * fix * Regenerate overview apps and run generator on every PR merge (#674) Regenerate both overview catalogs (sample_app_000 / sample_app_001) from the current folder tree via scripts/generate-launchpad.js, picking up the merged `only non-openui5 or higher UI5 1.71` subpackage and newly added samples. abaplint reports 0 issues. Trigger the generate_overview_apps workflow on every push to the standard branch (i.e. every PR merge), in addition to the existing manual workflow_dispatch, so the catalogs stay a faithful mirror of the tree. Claude-Session: https://claude.ai/code/session_015vTnxZtHiAd4tiqMvxFdgJ Co-authored-by: Claude <noreply@anthropic.com> * fix messages * Claude/overview apps samples generation f8bqz8 (#675) * Regenerate overview apps and run generator on every PR merge Regenerate both overview catalogs (sample_app_000 / sample_app_001) from the current folder tree via scripts/generate-launchpad.js, picking up the merged `only non-openui5 or higher UI5 1.71` subpackage and newly added samples. abaplint reports 0 issues. Trigger the generate_overview_apps workflow on every push to the standard branch (i.e. every PR merge), in addition to the existing manual workflow_dispatch, so the catalogs stay a faithful mirror of the tree. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015vTnxZtHiAd4tiqMvxFdgJ * Replace action->gen with follow_up_action across all samples Roll back the action->gen mechanism in favour of follow_up_action. Every client->action->gen( val = cs_event-X t_arg = ... ) call is rewritten to the behaviour-preserving equivalent client->follow_up_action( |.eF('X', args)| ), reproducing the frontend dispatcher string that action->gen generated internally (data arguments quoted, client->_event( ) arguments left unquoted as .eB(...) expressions). 46 call sites across 28 demo apps plus both overview apps converted; the two descriptive subheader strings in the obsolete demo_app_000 updated to match. abaplint reports 0 issues. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015vTnxZtHiAd4tiqMvxFdgJ * Use follow_up_action( val, t_arg ) instead of hand-written eF strings Now that follow_up_action accepts an optional t_arg and builds the frontend event itself, the samples pass the event and its arguments directly instead of assembling the .eF( ) dispatcher string by hand. This is simply the former action->gen( val = ... t_arg = ... ) call with the method renamed to follow_up_action - clearer and identical in behaviour. Requires the framework change that adds t_arg to follow_up_action; verified against it with abaplint (0 issues). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015vTnxZtHiAd4tiqMvxFdgJ * Use client->action( ) instead of follow_up_action for frontend events Switch every frontend-event trigger to the new dedicated client->action( ) method (former action->gen with the ->gen dropped), passing the event and its arguments directly: client->action( val = z2ui5_if_client=>cs_event-set_title t_arg = VALUE #( ( `Avatar Group Sample` ) ) ). Raw-JavaScript follow_up_action( ) calls are left as they are. Requires the framework change adding client->action( ); verified against it (abaplint 0). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015vTnxZtHiAd4tiqMvxFdgJ * Rebuild demo_app_361 view with the typed z2ui5_cl_xml_view API Replace the generic z2ui5_cl_util_xml builder with the typed fluent z2ui5_cl_xml_view API (shell/page/message_strip/button). The three info texts carried showIcon/type=Information - which are sap.m.MessageStrip properties (no-ops on sap.m.Text) - so they are now built as message_strip, the control those attributes actually belong to; the logout buttons and their _event_client / _event / action( ) handlers are unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015vTnxZtHiAd4tiqMvxFdgJ * demo_app_374: use typed split_container( ) instead of _generic workaround The comment claimed split_container( ) returns the page instead of the new control, so the SplitContainer was built via _generic( ). That was fixed in the framework - split_container( ) now returns the new control (result = _generic( ... )) - so the workaround is obsolete. Use the typed method; the produced XML is identical. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015vTnxZtHiAd4tiqMvxFdgJ * Move z2ui5/Util-using samples into new package 00/04 'use of z2ui5' The four samples that pull in the z2ui5/Util frontend helper in their views (via core:require {Helper:'z2ui5/Util'} + Helper.DateCreateObject) are grouped into a dedicated subpackage: - app_076 (gantt), app_179 (gantt II) from 00/02, 00/07 - app_080 (PlanningCalendar), app_231 (DateRangeSelection) from 01/08/00 Since FOLDER_LOGIC=PREFIX no classes are renamed. Both overview catalogs are regenerated: app_080/app_231 move from sample_app_001 to sample_app_000, and all four are listed under the new 'use of z2ui5' group. abaplint 0 issues. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015vTnxZtHiAd4tiqMvxFdgJ * Move demo_app_030 and demo_app_163 into 01/06 'samples - mixed' The two src/01 samples still using view->_generic_property: - app_030 (sap.f.DynamicPage) from 01/08/02 - app_163 (Popover V) from 01/01 Both stay in the basic area (src/01), so the overview catalog is regenerated with their tiles regrouped under 'samples - mixed'; no classes renamed (FOLDER_LOGIC=PREFIX). abaplint 0 issues. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015vTnxZtHiAd4tiqMvxFdgJ * Move built-in-popup samples into new package 00/08 'use of built-in popups' The six samples that call a framework built-in popup (z2ui5_cl_pop_*) are grouped into a dedicated subpackage: - app_056 (pop_get_range, ZZZ value-help helper) from 01/01 - app_279 (pop_to_confirm) from 01/05 - app_306 (pop_image_editor) from 01/05 - app_341 (pop_to_select) from 00/06 - app_111 (pop_js_loader) from 00/05 - app_090 (pop_js_loader) from 00/99 No classes renamed (FOLDER_LOGIC=PREFIX). Overview catalogs regenerated: app_279/app_306 move from sample_app_001 to sample_app_000; app_056 stays a hidden ZZZ helper (no tile). abaplint 0 issues. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015vTnxZtHiAd4tiqMvxFdgJ * Use follow_up_action( val, t_arg ) again instead of client->action( ) The dedicated client->action( ) method is removed in favour of the extended follow_up_action( val, t_arg ); switch every call site back: client->follow_up_action( val = z2ui5_if_client=>cs_event-set_title t_arg = VALUE #( ( `Avatar Group Sample` ) ) ). Plain method rename across 48 call sites; raw-JavaScript follow_up_action( ) calls are unaffected. Requires the framework change; verified against it (abaplint 0 issues). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015vTnxZtHiAd4tiqMvxFdgJ * Add demo_app_445: DISPLAY_MESSAGE_BOX / DISPLAY_MESSAGE_TOAST demo Sample showing the two new frontend events. Four buttons: a toast and a message box triggered from the backend (follow_up_action, message only), and a toast and a message box triggered from a frontend binding (_event_client) that pass a JS options object 1:1 to MessageToast.show( ) / MessageBox.show( ) (duration/width/ docking for the toast, title/actions for the box). Lands in 00/07 (experimental) as it relies on the not-yet-released events; overview regenerated, abaplint 0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015vTnxZtHiAd4tiqMvxFdgJ * demo_app_445: pass MessageBox/Toast options as bound JSON, not inline object The inline object literal { title: ..., actions: [...] } is not evaluated as an object in a UI5 event-handler argument, so title/actions never reached MessageBox.show( ). Pass the options as a model-bound JSON string instead and resolve it via ${...} (the same pattern the framework uses for STORE_DATA); the DISPLAY_MESSAGE_* handler JSON.parses the string. Options use proper JSON with lowercase keys so they map 1:1 to the control API. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015vTnxZtHiAd4tiqMvxFdgJ * demo_app_445: pass MessageBox/Toast options as inline JS object again With _runCustomJs now evaluating the eF( ) call (instead of splitting on quotes), the inline options object survives, so the frontend buttons pass { title: ..., actions: [...] } / { duration: ..., width: ... } straight to MessageBox.show( ) / MessageToast.show( ). Reverts the JSON-string-via-binding workaround. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015vTnxZtHiAd4tiqMvxFdgJ * demo_app_445: trigger DISPLAY_MESSAGE_* from the backend with 1:1 options Use follow_up_action to fire both events with a JSON options string that maps 1:1 to the control API: - DISPLAY_MESSAGE_TOAST: message + options -> MessageToast.show( ) - DISPLAY_MESSAGE_BOX: method (confirm) + message + options -> MessageBox.confirm( ) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015vTnxZtHiAd4tiqMvxFdgJ * fix * Fix start_timer callback: pass event name, not client->_event() snippet The three start_timer follow_up_action callers passed client->_event( `X` ) as the callback argument, which expands to a .eB([...]) roundtrip snippet. Nested inside the generated .eF('START_TIMER', .eB([...]), '2000') string it is invalid JS - the frontend timer handler (evStartTimer) already wraps the callback itself via oController.eB([callbackEvent]) and therefore expects the plain event name. Pass the bare name, matching the documented timer API. Affects app_028, app_064, app_353. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015vTnxZtHiAd4tiqMvxFdgJ * Regenerate sample overview catalogs Regenerated via npm run launchpad to reflect the latest app reorganization (apps 120/374 moved to src/01, 163 to src/01/01, 030 to src/01/08, app_445 removed) and updated descriptions. 319 tiles, 10 ZZZ helper apps hidden. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015vTnxZtHiAd4tiqMvxFdgJ * Move app_030 into controls - sap.f, rename Demo Kit package app_030 (sap.f.DynamicPage) sat loose in the src/01/08 parent package; move it into src/01/08/02 (controls - sap.f) where it belongs. Rename the parent package src/01/08 from "controls - UI5 Demo Kit Copy" to "controls - UI5 Demo Kit". Regenerate the overview catalog accordingly. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015vTnxZtHiAd4tiqMvxFdgJ * fixes * fix * fix * app_030: anchor popover to the pressed control like the official sample The popover opened by hardcoded control ids (generic_tag_id / button_layout_data_id) - the only popover sample doing so. Match the official DynamicPageFreeStyle sample (oEvent.getSource) and every other popover sample by passing the source control id via ${$source>/id} and opening the popover by that id. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015vTnxZtHiAd4tiqMvxFdgJ * Simplify get_event_arg( 1 ) to get_event_arg( ) across samples get_event_arg defaults its index to 1, so get_event_arg( 1 ) and get_event_arg( ) are equivalent - use the shorter form. Higher indices ( 2 ), ... are left unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015vTnxZtHiAd4tiqMvxFdgJ * fix * Regenerate sample overview catalogs Regenerate via npm run launchpad to reflect the latest app reorganization (apps moved between packages, some removed, group/description renames). 314 tiles, 9 ZZZ helper apps hidden. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015vTnxZtHiAd4tiqMvxFdgJ * Sort loose src/01/08 classes into their library subfolders The demo-kit apps that sat directly in the src/01/08 parent package are moved into the matching per-library subfolder: the sap.m controls into 00 (controls - sap.m) and the sap.ui.layout.Grid sample into 04 (controls - sap.ui.layout). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015vTnxZtHiAd4tiqMvxFdgJ * Regenerate sample overview after src/01/08 subfolder sorting The relocated apps now group under their library (controls - sap.m / controls - sap.ui.layout) instead of the generic Demo Kit parent. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015vTnxZtHiAd4tiqMvxFdgJ * Reclassify NavigationList/ColorPicker to their real UI5 libraries app_258 uses sap.tnt.NavigationList (not sap.m) and app_270 uses sap.ui.unified.ColorPicker (not sap.m) - their DESCRIPTs were porting typos. Correct the DESCRIPT namespaces, move app_258 to 05 (controls - sap.tnt) and add a new package 07 (controls - sap.ui.unified) for app_270. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015vTnxZtHiAd4tiqMvxFdgJ * Regenerate sample overview after NavigationList/ColorPicker reclassification Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015vTnxZtHiAd4tiqMvxFdgJ --------- Co-authored-by: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 7e4cff3 commit 7c637d6

299 files changed

Lines changed: 915 additions & 5564 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/generate_overview_apps.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: generate_overview_apps
22

33
on:
4+
push:
5+
branches: [standard]
46
workflow_dispatch:
57

68
permissions:

src/00/01/z2ui5_cl_demo_app_s_03.clas.abap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,14 @@ CLASS z2ui5_cl_demo_app_s_03 IMPLEMENTATION.
7979
IF client->get( )-event = `enter`.
8080

8181
IF magic_key = `abap2UI5`.
82-
client->action->gen(
82+
client->follow_up_action(
8383
val = z2ui5_if_client=>cs_event-play_audio
8484
t_arg = VALUE #( ( `/SAP/PUBLIC/BC/ABAP/mime_demo/z2ui5_demo_success.mp3` ) ) ).
8585
message-type = `Success`.
8686
message-text = `Hooray!`.
8787

8888
ELSE.
89-
client->action->gen(
89+
client->follow_up_action(
9090
val = z2ui5_if_client=>cs_event-play_audio
9191
t_arg = VALUE #( ( `/SAP/PUBLIC/BC/ABAP/mime_demo/z2ui5_demo_error.mp3` ) ) ).
9292
message-type = `Error`.

src/00/02/package.devc.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
44
<asx:values>
55
<DEVC>
6-
<CTEXT>only non-openui5</CTEXT>
6+
<CTEXT>only non-openui5 or higher UI5 1.71</CTEXT>
77
</DEVC>
88
</asx:values>
99
</asx:abap>
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ CLASS z2ui5_cl_demo_app_106 DEFINITION PUBLIC.
1010
ENDCLASS.
1111

1212

13-
CLASS z2ui5_cl_demo_app_106 IMPLEMENTATION.
13+
14+
CLASS Z2UI5_CL_DEMO_APP_106 IMPLEMENTATION.
15+
1416

1517
METHOD z2ui5_if_app~main.
1618

@@ -52,5 +54,4 @@ CLASS z2ui5_cl_demo_app_106 IMPLEMENTATION.
5254
ENDCASE.
5355

5456
ENDMETHOD.
55-
5657
ENDCLASS.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<VSEOCLASS>
66
<CLSNAME>Z2UI5_CL_DEMO_APP_106</CLSNAME>
77
<LANGU>E</LANGU>
8-
<DESCRIPT>Rich Text Editor</DESCRIPT>
8+
<DESCRIPT>sap.ui.RichTextEditor</DESCRIPT>
99
<STATE>1</STATE>
1010
<CLSCCINCL>X</CLSCCINCL>
1111
<FIXPT>X</FIXPT>

0 commit comments

Comments
 (0)