Fix Widget Docs#100
Conversation
Reformat schema. Fix syntax errors in types. Add HTML types to DTD. Update types to match what the file is generally doing. Update the file to match updated types. Uncomment tags that are commented out for some reason. fix mistakes in widgets.xml.
*This commit should be added to the git ignore refs list. Apply automatic XML formatting with manual cleanup.
chart widget: Add docs for Click and DblClick events. component-decl widget: Add docs for child widget component-decl-cprop. Add docs for child widget component-decl-event. Add docs for child widget component-decl-action. checkbox widget: Improve SetValue action docs. datetime widget: Improve SetValue action docs. dropdown widget: Improve SetGroup, SetItems, and SetValue action docs. editbox widget: Add Disable action docs. Improve DataModify event docs. Improve SetFocus and SetValue action docs. window widget: Improve Open, Popup, and SetVisibility action docs. Improve Open and Close action implementation docs. Remove NoInit param from SetVisibility action on window widget. form widget: Improve Clear, Discard, Disable, Enable, New, QueryExec, Save, and Submit action docs. Fix typos. formstatus widget: Add Click event docs. Fix typos. table widget: Add table-row-detail child widget docs. clean up: Remove C registration of osrc-rule widget which no longer exists. Update C registration of scrollpane, form, and editbox widgets' events/actions. Improve comments. Improve widget doc writing. Fix typos in widget docs.
Add full documentation for the file upload to widgets.xml. Fix htdrv_fileupload.c registering events and actions that don't exist.
Replace docs of Click and DblClick events with new docs that use consistent wording.
Add more HTML widget event docs. Add more menu widget event/action docs. Add more table widget action docs. Add more textbutton widget action docs. Fix typo in timer widget Expire event docs. Fix textarea widget registering DataModify event using the wrong name.
Greptile SummaryThis PR corrects event/action registrations in several
Confidence Score: 5/5Safe to merge — all changes are documentation metadata corrections and dead code removal with no impact on runtime logic. Every changed C file only calls htrAddEvent, htrAddAction, and htrAddParam — registration calls that feed the doc-report tool. The two remaining mismatches are doc-accuracy issues, not runtime regressions. The JS changes are minor and semantically safe. htdrv_textarea.c has a leftover param name mismatch (NewValue vs Value) that the editbox fix was meant to address in both files. htdrv_scrollpane.c registers Scroll and Wheel events that have no JS implementation yet.
|
| Filename | Overview |
|---|---|
| centrallix/htmlgen/htdrv_textarea.c | Renames event from Modified to DataModify but still uses NewValue instead of Value and omits FromKeyboard/FromOSRC params — mismatches what the JS actually fires. |
| centrallix/htmlgen/htdrv_editbox.c | Renames event from Modified to DataModify and corrects params (Value, OldValue, FromKeyboard, FromOSRC) to match what htdrv_editbox.js fires. |
| centrallix/htmlgen/htdrv_fileupload.c | Renames Reset action to Clear and replaces Success event with UploadComplete, UploadError, and Change — all matching the JS registrations in htdrv_fileupload.js. |
| centrallix/htmlgen/htdrv_form.c | Adds Disable and Enable actions (matching ia.Add in JS) and removes QueryExec as an event (it is an action in JS, not an event). |
| centrallix/htmlgen/htdrv_scrollpane.c | Adds Scroll, Wheel events and ScrollTo action; ScrollTo is implemented in JS but Scroll and Wheel have no JS counterpart, making them phantom registrations. |
| centrallix/htmlgen/htdrv_window.c | Removes NoInit param from SetVisibility; NoInit is absent from htdrv_window.js, so the removal is correct. |
| centrallix/htmlgen/htdrv_osrc.c | Removes a large #if 00 dead-code block for osrc-rule and a commented-out pObjQuery variable, leaving cleaner render logic. |
| centrallix/wgtr/wgtdrv_osrc.c | Removes wgtrAddType(name, "osrc-rule") registration; consistent with the removal of the dead osrc-rule handler in htdrv_osrc.c. |
| centrallix-os/sys/js/htdrv_window.js | Refactors wn_closewin and wn_openwin to use spread syntax instead of mutating aparam in place when invoking SetVisibility. |
| centrallix-os/sys/js/htdrv_editbox.js | Minor comment cleanup — clarifies that aparam.Description drives the description update via SetValueDescription. |
| centrallix-doc/Widgets/widgets.xml | Large reformatting and expansion: adds many missing widgets, properties, events, and actions, and improves the DTD spec for consistent structure. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["htdrv_*.c Initialize"] --> B["htrAddEvent / htrAddAction / htrAddParam"]
B --> C["Event/Action Registry"]
C --> D["doc-report script"]
C --> E["Runtime JS: cn_activate / ia.Add / ie.Add"]
subgraph editbox ["editbox - FIXED"]
EB_C["htdrv_editbox.c: DataModify with Value, OldValue, FromKeyboard, FromOSRC"]
EB_JS["htdrv_editbox.js fires DataModify with Value, FromKeyboard, FromOSRC, OldValue"]
EB_C <-->|match| EB_JS
end
subgraph textarea ["textarea - INCOMPLETE"]
TX_C["htdrv_textarea.c: DataModify with NewValue, OldValue ONLY"]
TX_JS["htdrv_textarea.js fires DataModify with Value, FromKeyboard, FromOSRC, OldValue"]
TX_C <-->|mismatch| TX_JS
end
subgraph scrollpane ["scrollpane - PARTIAL"]
SP_C["htdrv_scrollpane.c: Registers Scroll + Wheel events, ScrollTo action"]
SP_JS["htdrv_scrollpane.js: ia.Add ScrollTo only, no Scroll or Wheel registered"]
SP_C <-->|Scroll and Wheel unimplemented in JS| SP_JS
end
A --> editbox
A --> textarea
A --> scrollpane
Reviews (2): Last reviewed commit: "Resolve Greptile's comments." | Re-trigger Greptile
Fix DataModify event for the editbox widget which registered a NewValue param when it is actually called Value. Remove osrc-rule code clutter that confused Greptile. Clean up code clutter.
|
@greptileai I think I've finished resolving the issues you mentioned. Please rereview. |
|
This PR is cleared for human review. |
Changes:
htdrv_*.cfiles that registered their widget's events/actions incorrectly.widgets.xmland updated the entire file to follow the new spec.widgets.xmlto a consistent format.Results:
When running the unfinished doc-report script on
master, we get a lot of doc issues:========
After this PR, we have significantly fewer issues:
========
Note: The issue count will fall even further after clean up from other PRs like #90 is merged:
========
Note 2: All of these changes were made on the
fix-widget-docs-devbranch, which is based off of several other branches that aren't merged yet. In order to make this branch, I had to cherry-pick all the commits from that branch onto this branch, which is based off of master. This was a very difficult and technical process, so if you notice any bizarre changes on this branch, please let me know because that might be the cause of the issue.Note 3: When merging, ensure that
6fab4ecaa4fe827adfb9b828bf86e88d4b3c8b2ais added to the ignore diffs list because it contains the general reformat ofwidgets.xml.Note 4: These issues were detected using the script in PR #101.