Repository navigation
One method order, one name for seeding, one dispatcher chain; bind instead of rebuilding - #896
Merged
Merged
Conversation
…nt, model_init last A reader meets what the app shows first, then what it does, and the seed data at the end - the order samples-controls always had. 106 classes are reordered (implementation and declarations). The first extraction is model_init and only seeds; main displays after it: 18 on_init methods became model_init, 5 that only passed a call on are inlined. Seven apps keep an on_init that does more than seed and display. AGENTS.md states the order and the template follows it. No statement changed. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014YZFmEbWzsAKBJU9C5JSHn
Dispatcher (19 classes reviewed): - 5 rewritten into the canonical IF/ELSEIF chain with unchanged behaviour: 052, 161, 167, 325, 536 (no RETURN, no second IF block, no bare ELSE, events checked in the check_on_event( ) branch). - 2 keep their deliberate shape and now say why in main( ): 024 (takes the event the called app hands back), 025 (seeded by its caller). - 12 unchanged: already canonical (045, 061, 125, 503) or already commented (004, 047, 071, 098, 104, 105, 112, 504). View rebuilds in event handlers (40 classes reviewed): - 5 converted to a bound public attribute, the view_display( ) call removed from the event path: 011 (edit button text), 025 (input of the previous app), 468 and 480 (counter), 471 (toggle button text). - 2 redundant rebuilds removed, the changed table was bound already: 019 (BUTTON_READ_SEL), 500 (BUTTON_DELETE, BUTTON_REFRESH). - 10 keep the rebuild with a comment above the call saying why the model push is not enough: 012, 019, 025, 065, 074, 173, 306, 488, 518, 533. - The rest had such a comment already or no rebuild on an event path. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014YZFmEbWzsAKBJU9C5JSHn
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.
Three changes that make the samples read alike, and like samples-controls.
1. Method order and the name for seeding
This step changes no statement.
main,view_display,on_event, handlers and helpers,model_initlast, in declarations and implementation. A reader meets what the app shows first, then what it does, and the seed data at the end. 106 classes are reordered.model_initonly seeds. 18on_initmethods becamemodel_init, andmaincallsview_display( )after it. Fiveon_initthat only passed one call on are inlined.on_initthat does more than seed and display (004, 081, 381, 382, 421, 501, 543).AGENTS.mdstates the order, and the template follows it.2. Dispatcher
Only a handful of classes deviated from the one
IF/ELSEIFchain.main( )saying why: 024, 025.3. Rebuilds in event handlers
edit_button_text), 025, 468, 480, 471.BUTTON_READ_SEL, 500 delete and refresh.Behaviour changes to be aware of
Left alone on purpose
019 (the table mode), 067 and 143. It was not clear whether the rebuild there is part of what the sample shows.
Checks
npm run checkis green exceptcheck:abap2ui5.check:abap2ui5reports the knownbinding-to-referenceerror on app 061, as onmain. It goes with the next linter release on npm.Generated by Claude Code