Skip to content

Add scroll positioning demos and reorganize sample apps#620

Merged
oblomov-dev merged 15 commits into
standardfrom
claude/peaceful-turing-wnP14
May 22, 2026
Merged

Add scroll positioning demos and reorganize sample apps#620
oblomov-dev merged 15 commits into
standardfrom
claude/peaceful-turing-wnP14

Conversation

@oblomov-dev
Copy link
Copy Markdown
Member

Summary

This PR introduces two new demo apps showcasing scroll positioning features and reorganizes the demo app structure by moving several samples to a dedicated package and renaming classes for consistency.

Key Changes

  • New demo apps:

    • z2ui5_cl_demo_app_362: Demonstrates SCROLL_TO client action for scrolling to specific pixel positions with smooth/instant behavior
    • z2ui5_cl_demo_app_363: Demonstrates SCROLL_INTO_VIEW client action for scrolling elements into view with configurable alignment and behavior
  • Demo app reorganization:

    • Created new package 03 for generic XML samples
    • Moved 14 demo apps to package 03 (apps 032, 036, 037, 040, 060, 084, 093, 111, 141, 178, 201, 309, and renamed 116, 172, 317, 346)
    • Moved app 134 to package 99 and renamed to z2ui5_cl_demo_app_134_0
    • Moved app 180 to package 99
  • Updated demo app 000 (main navigation):

    • Removed tiles for deprecated demos (Follow Up Action, Input with Suggestion, Tree Table II, Follow Up Action with JS Function)
    • Replaced single "Scrolling" tile with two new tiles linking to the scroll positioning demos
    • Commented out unused grid layout code
  • Minor updates:

    • Updated package descriptions: "on-premise only" → "non-cloud only", "launchpad samples" → "launchpad", "UI5 Demo Kit samples" → "generic xml"
    • Fixed dialog configuration in app 038 (added verticalscrolling parameter)
    • Minor formatting adjustments in apps 039, 044, 094, 096, 143, 197, 303, 307, 325, 330, 331

Implementation Details

The new scroll positioning demos provide practical examples of the client-side scroll actions:

  • SCROLL_TO uses pixel-based positioning with optional smooth scrolling behavior
  • SCROLL_INTO_VIEW uses element-based targeting with block alignment options (start/center)

Both demos include interactive buttons to trigger scroll actions and demonstrate the API usage patterns.

https://claude.ai/code/session_019JWLbTFrzcKUxpMtZK4Vx7

claude and others added 15 commits May 22, 2026 05:48
Apps 116, 172, 317, and 346 have no counterpart in the main app
numbering (src/) - they are orphans in the obsolete pkg 99. All four
use native JavaScript via <script> tags, so collect them in a new
package "UI5 demo apps using native JavaScript" and drop the _0
suffix.
Apps 032, 036, 037, 040, 060, 084, 093, 111, 141, 178, 201, and 309 all
use native JavaScript via <script> tags or sap.z2ui5 client-side hooks.
Consolidate them in the dedicated native JS package.
The four "Work in Progress" tiles still referenced the old class names
with the _0 suffix. Since the dispatcher in app 000 creates objects via
CREATE OBJECT li_app TYPE (lv_classname) and silently swallows
cx_root, clicking those tiles was a no-op.
Move the tiles for 032, 036, 037, 040, 060, 084, 093, 178, and 309 out
of their original panels, and add new tiles for 141 and 201 (previously
unlinked). Drop the now-empty "JS" sub-panel under Custom Extensions.

Each native JS demo app now has exactly one entry, all under Work in
Progress.
Remove its tile from the app 000 launchpad and move the class to the
obsolete package 99.
Several apps reachable from the app 000 launchpad had no back button,
so the user got stuck after navigating in.

- 094, 096, 143: existing page() call, just add navbuttonpress and
  shownavbutton
- 044: wrap the bare label in shell()->page() with back button
- 303, 325, 330: wrap object_page_layout in shell()->page()
- 307: wrap the standalone panel in shell()->page()
- 031, 039: wire up the existing BACK button to nav_app_leave
  (031 had the button but no handler, 039 had no wrapper Page)

Skipped: helper/data classes without views and App-in-App sub-views
whose parent already owns the page.
A new overview app that mirrors the proposed structure (9 thematic
sections + a §10 Compatibility & Experimental section for sub-package
and edge-case samples). The original launchpad at app 000 stays as-is
for now so the two can be compared side by side.

Sections:
 1. Getting Started
 2. Data Binding
 3. Events & Navigation
 4. Input Controls
 5. Display & Data
 6. Layouts
 7. Popups, Dialogs & Messages
 8. Files & I/O
 9. Advanced & Extensions
10. Compatibility & Experimental
    (Smart Controls, Custom CSS, Higher Releases, Internal/Testing,
     + sub-packages 00/01/02/03)

Helper/data classes and App-in-App sub-views are not linked.
- Rename last top-level section from "UI5 Version Specific & WIP" to
  "UI5 Version Specific, Experimental & WIP"
- Add one sub-panel per sub-package (00, 01, 02, 03) under it, with
  tiles for every class in the package. Package 99 (obsolete) is not
  linked.

Note: package 03 (native JS) apps now appear both under Work in
Progress (where they were consolidated previously) and the new pkg 03
sub-panel. Deduplication can be done in a follow-up if desired.
The native JS apps now live exclusively under the dedicated
"Native JS — experimental (pkg 03)" sub-panel. The previous Work in
Progress tiles for the same 16 classes have been removed so every app
shows up exactly once.
The Scrolling custom control is replaced by two new client actions in
the framework (PR abap2UI5#2280):
- SCROLL_TO          - set scrollTop / scrollLeft by pixel
- SCROLL_INTO_VIEW   - bring a control into the viewport

Changes:
- Move app 134 ("Scrolling" - old custom-control demo) to pkg 99 as
  z2ui5_cl_demo_app_134_0 (obsolete).
- Add app 362 demonstrating SCROLL_TO: a table of 100 rows with toolbar
  buttons that scroll the page to top / middle / bottom (smooth + jump).
- Add app 363 demonstrating SCROLL_INTO_VIEW: a long form with three
  inputs separated by spacers and a Validate button - if the required
  middle input is empty the page scrolls to it via scrollIntoView.

Both samples use literal `SCROLL_TO` / `SCROLL_INTO_VIEW` strings until
the framework PR is merged and the cs_event constants land on main.
Launchpad app 000 now links 362 + 363 in place of the old 134 tile.
Use the typed constants z2ui5_if_client=>cs_event-scroll_to and
cs_event-scroll_into_view instead of literal strings, and add the
"preserve scroll position across roundtrips" demo to app 362 using
client->get( )-s_scroll-main.

abaplint reports 7 errors against the upstream main branch because the
constants and the s_scroll struct are only on the abap2UI5 PR #2280
branch. They will go away as soon as that PR is merged.
@oblomov-dev oblomov-dev merged commit 35343b3 into standard May 22, 2026
4 of 6 checks passed
@oblomov-dev oblomov-dev deleted the claude/peaceful-turing-wnP14 branch May 22, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants