Skip to content

Implement Responsive Client-Side Autoscaling#90

Open
Lightning11wins wants to merge 297 commits into
masterfrom
apos_autoscale9-slim5
Open

Implement Responsive Client-Side Autoscaling#90
Lightning11wins wants to merge 297 commits into
masterfrom
apos_autoscale9-slim5

Conversation

@Lightning11wins
Copy link
Copy Markdown
Contributor

@Lightning11wins Lightning11wins commented Mar 4, 2026

After extracting changes into #87, #88, #89, and removing a few minor/unnecessary changes; this PR is hopefully slightly more manageable.

GitHub Relationships:

This PR is blocked behind the following PRs, which must be merged into master before this PR is reviewed:

This PR includes several TODOs:

  • 4 TODOs for Greg (although other reviewers are welcome to handle these if they have the requisite knowledge), in the following files: ht_render.c, htdrv_page.c, htdrv_tab.c, and htdrv_table.c.

There are several known issues with this code:

  • Table row details sometimes don't appear.
    • e.g. Broken left menus on the Kardia home page.
  • Code that breaks responsive layout.
    • widget/pane: resize action (test apps/kardia/modules/payroll/pay_form.app)
    • widget/image: offset & scale actions (not used anywhere)
    • widget/objcanvas: add_osrc_object()
  • ht_get_parent_w/h__INTERNAL() & wgtrGetContainerWidth/Height() should be merged.
    • They appear to give almost identical results, except when checking a top-level widget. In this case, ht_get_parent_h__INTERNAL() (mine) gives a height 2px taller.
  • Flexibility calculations that depend on page size cause breakage since the client assumes widget flexibility scale is constant.
    • This would be very hard to fix! The best solution I can think of so far is to rewrite the entire layout system to convert px -> % on the server, then do all layout client-side. However, I'm not sure this system could handle flexibility values at all.

Greptile Comment

…osine vectors instead of the data strings.

Clean up driver code to make it more readable.
…ored during cosine vector creation.

Improve edge case handling in clusters.c.
Add CommentAnchorsExtension.md to document the use of the comment anchors VSCode extension.
Add comment anchors support to string_similarity.md.
Add a new known issue to string_similarity.md.
…yout, button, editbox, html, image, label, scrollpane, textbutton, & treeview.
Fixes components, dropdowns, and images.
Renames flex variables to be more clear.
Send parent_w and parent_h to client.
Add tab-height support to apos.c.
Add design support to apos.c.
Add IsDesign to the WgtrClientInfo struct.

Fix spelling mistakes.
Clean up.
Add an error message when cxsecVerifySymbol_n() fails.
Improve an existing error message when htr_internal_WriteWgtrProperty() fails to write a property of an unknown type.
Set Centrallix event listener to be explicitly non-passive, fixing a console error when later code assumes that calling preventDefault() is allowed.
Fix a bug in qprintf() that caused % and & characters inside conditional printing areas to always print, regardless of the condition.
Improve documentation for qpfPrintf_va_internal() and qpf_grow_fn_t().
Clean up.
Add shortcut functions: ht_flex_x(), ht_flex_y(), ht_flex_w(), ht_flex_h().
Rename fl_scale_x (was total_fl_x).
Rename fl_scale_y (was total_fl_y).
Rename fl_scale_w (was total_fl_w).
Rename fl_scale_h (was total_fl_h).
Rename fl_parent_w (was parent_w).
Rename fl_parent_h (was parent_h).
Remove ht_flex_format_all and ht_flex_all().
Improve usage of new feature in previously updated widgets.

Fix spelling mistakes.
Clean up.
Clean up some apps.
Add Math.clamp() and Math.isBetween().
Add getParentSize(), getParentW(), and getParentH().
Refactor getRelativeX/Y/W/H() to call the new getRelative().
Refactor setRelativeX/Y/W/H() to call the new setRelative().
Add fast_setRelativeX/Y().
Add setResponsiveX/Y/W/H() using a new shared setResponsive().
Add responsiveness to moveTo() with the new functions.

Fix style guide mistakes.
Clean up.
Add support for more edge cases with undefined values to wgtrGetServerProperty().
Add the Log action (and docs).
Add the ReloadPage action (and docs).
Improve documentation for the Alert widget.
@Lightning11wins
Copy link
Copy Markdown
Contributor Author

@greptileai I think I've addressed your previous comments. Please rereview this PR.

Comment thread centrallix/wgtr/wgtdrv_autolayout.c
Comment thread centrallix/htmlgen/ht_render.c
@Lightning11wins
Copy link
Copy Markdown
Contributor Author

@greptileai I think I've addressed your previous comments. Please rereview this PR.

@Lightning11wins
Copy link
Copy Markdown
Contributor Author

This PR is once again ready for human review (after the blockers mentioned above are resolved).

It will be with us forever in our hearts (and also in the git tree).
Add qpfNoGrow() and qpfSysMallocGrow() grow functions for use when calling qpfPrint_g*() functions.
Add qpfPrintf_g() and qpfPrintf_gva() qprintf variants that allow passing a grow function.
Improve doc comments for all qpfPrintf*() functions.
Rename mssError() to mssError_internal() which takes a file name and line number.
Add mssError() macro that collects and passes the file and line number to mssError_internal().
Remove newline when the error stack is cleared because libraries might have already printed relevant errors.
Replace htrRenderError() with htrGetErrorHTML() which returns an error HTML string, letting the caller do the rendering.
Add htrGetErrorHTML() to ht_render.h so it can be used elsewhere.
Update ht_render.c to handle the new syntax for htrGetErrorHTML().
Improve function doc comments.
Comment thread centrallix-os/sys/js/htdrv_table.js Outdated
Comment thread centrallix-os/sys/js/htdrv_table.js Outdated
Comment thread centrallix/htmlgen/ht_render.c Outdated
@Lightning11wins
Copy link
Copy Markdown
Contributor Author

This PR is once again ready for human review (after the blockers mentioned above are resolved).

@Lightning11wins
Copy link
Copy Markdown
Contributor Author

@greptileai There's a bug somewhere in this PR that causes table row detail widgets to fail to render or render incorrectly. When they do occasionally render, the row that contains them no longer resizes to hold them so they overlap onto the rows below them. Can you figure out what might be causing the bugs with table row detail widgets? (The problem is probably in htdrv_table.js, but it might be elsewhere in the changes for this PR. Ignore changes merged into the PR from other branches.)

@Lightning11wins
Copy link
Copy Markdown
Contributor Author

@greptileai There's a bug somewhere in this PR that causes table row detail widgets to fail to render or render incorrectly. When they do occasionally render, the row that contains them no longer resizes to hold them so they overlap onto the rows below them. Can you figure out what might be causing the bugs with table row detail widgets? (The problem is probably in htdrv_table.js, but it might be elsewhere in the changes for this PR. Ignore changes merged into the PR from other branches.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review Request AI review for PRs. blocked No more work can be done until other work is completed. documentation Changes, improvements, or fixes to documentation files. help wanted size: large Definitely very hard to review, probably well over 5000 lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Autoscaling/responsive widgets using CSS calc()

1 participant