Reorganize documentation: move browser interaction and device features to cookbook - #87
Merged
Merged
Conversation
Move files from docs/development/* into docs/cookbook/<section>/ where <section> matches each cookbook menu group (view, model, event_navigation, popup_popover, device_capabilities, browser_interaction, translation_messages, eml_cds_sql, expert_more), and rename files so each filename matches the menu entry text (e.g. nested.md -> nested_views.md, errors.md -> exception.md, locks.md -> lock.md, files.md -> upload_download.md, xlsx.md -> spreadsheet.md, device.md -> device_model.md, translation.md -> translation_i18n.md). The two Experimental items live under the Advanced Topic menu, so move drag.md and smart_controls.md to docs/advanced/experimental/. Update all sidebar/nav links in .vitepress/config.mjs and fix intra-page references in custom_js.md, next.md, popup.md and the moved files. Delete the orphan placeholder development/navigation/navigation.md.
Update the H1 of each cookbook page so it matches the sidebar entry that links to it: Follow-up -> Action, Inner/Cross App -> Navigation, Errors -> Exception, Built-In Popups -> Built-In, Geolocation, Maps -> Geolocation, Timer, Auto-Refresh -> Timer, Messages -> Message, Logging, BAL -> Logging, Locks -> Lock, App State, Share, Bookmark -> App State, Share, CL_DEMO_OUTPUT -> Demo Output, Smart Controls -> Smart Control.
Update all cookbook code samples and prose so that backend-triggered frontend events use the new client->action( val = ..., t_arg = ... ) method instead of the deprecated client->follow_up_action( client->_event_client( ... ) ) pattern. follow_up_action is no longer the recommended call. Rewrite the four browser interaction pages whose custom controls (_z2ui5( )->focus/scrolling/timer and the document.title JS pattern) are now redundant — they can be driven directly from the backend via the corresponding cs_event constants: title.md -> cs_event-set_title focus.md -> cs_event-set_focus scrolling.md -> cs_event-scroll_to / cs_event-scroll_into_view timer.md -> cs_event-start_timer (re-arm in the handler to repeat) Also update soft_keyboard.md to use cs_event-keyboard_set_mode, and barcode_scanning.md to use cs_event-set_focus and cs_event-play_audio, removing the previous raw-JavaScript follow-up patterns. Extend frontend.md with the new cs_event constants (set_title, set_focus, scroll_to, scroll_into_view, start_timer, keyboard_set_mode, clipboard_copy, clipboard_app_state, history_back) and explain the relationship between _event_client (inline frontend) and the new action method (frontend event triggered from the backend).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR reorganizes the documentation structure to improve navigation and clarity. Content related to browser interactions and device capabilities has been moved from
docs/development/specific/to a newdocs/cookbook/browser_interaction/anddocs/cookbook/device_capabilities/structure, with corresponding updates to the sidebar navigation configuration.Key Changes
z2ui5.Timer,z2ui5.focus(), andz2ui5.scrolling()custom controls that relied on data bindingstart_timerevent for timer functionality (replaces Timer custom control)set_focusevent for focus management (replaces focus custom control)scroll_toandscroll_into_viewevents for scrolling (replaces scrolling custom control)keyboard_set_modeevent for soft keyboard controldocs/cookbook/browser_interaction/with: timer, focus, scrolling, title, clipboard, url_handlingdocs/cookbook/device_capabilities/with: info, camera, geolocation, barcode_scanning, soft_keyboard, pdf, upload_download, spreadsheetdocs/cookbook/event_navigation/with newaction.mdfor follow-up actionsdocs/cookbook/expert_more/docs/.vitepress/config.mjs): Updated all sidebar links to reflect new directory structure and renamed pages for consistencyImplementation Details
The refactoring shifts from a custom control model (where UI state was bound to backend variables) to a frontend event model (where the backend explicitly triggers browser actions via
client->action()). This approach is more explicit and aligns better with how modern web frameworks handle side effects.All code examples have been updated to use the new event-based API while maintaining the same functionality.
https://claude.ai/code/session_01C1F5XKNxAH4WAYm4czApQy